The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My user_settings.php
#1
Hello again, in my user_settings.php I have three additional fields, which are phone number, address and company. I can not add the verification or the success or error message. I already have the form ready and I have the three respective tables for those fields but I do not manage to record this data in my db, I had this resolved in 4.2 but in 4.3.4 it is hitting me hard in the head. maybe you can help me
  Reply
#2
Sorry I already solved it

<pre>
Code:
//Update address
        if ($userdetails->address != $_POST['address']){
            $address = ucfirst(Input::get("address"));
            $fields=array('address'=>$address);
            $validation->check($_POST,array(
                'address' => array(
                    'display' => 'address',
                    'required' => true,
                    'min' => 1,
                    'max' => 255
                )
            ));
            if($validation->passed()){
                $db->update('users',$userId,$fields);
                $successes[]='Address updated.';
                                logger($user->data()->id,"User","Changed address from $userdetails->address to $address.");
            }else{
                //validation did not pass
                foreach ($validation->errors() as $error) {
                    $errors[] = $error;
                }
            }
        }else{
            $address=$userdetails->address;
        }
</pre>
  Reply
#3
You may want to take the ucfirst( off of your variable, that is used for fname and lname to ensure they are cased properly. Instead just have $address = Input::get("address");
  Reply
#4
Brandin... you're a genius. Greetings....

This line
Code:
<?= $settings->site_name . (($pageTitle != '') ? ' - '.$pageTitle : ''); ?>
shows the name of the site and is separated by a - the name of the page. as it would in reverse, name of the page - name of the site. I failed and I died trying.
  Reply
#5
I didn't write the code for this portion and I'm unable to work on it at this time. I'll see what I can come up with for you over the next few days unless someone else does in the meantime.
  Reply
#6
In the same way, thank you very much.
  Reply
#7
I'm having a hard time understanding where you're stuck? Can you let me know and then paste your entire file to pastebin and share the link here?
  Reply
#8
Hello this line
Code:
<? = $ Settings-> site_name. (($ PageTitle! = '')? '-'. $ PageTitle: '');?>
It shows me the name of the site and then the name of the page.Y I want the name of the page first and then the name of the site.
  Reply
#9
Ohh. I can fix this tomorrow. I will take care of it.

-Mudmin
  Reply
#10
Thank you very much mudmin!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)