The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
#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


Messages In This Thread
My user_settings.php - by shoropio - 11-19-2017, 03:44 PM
My user_settings.php - by shoropio - 11-19-2017, 04:15 PM
My user_settings.php - by Brandin - 11-19-2017, 04:50 PM
My user_settings.php - by shoropio - 11-19-2017, 10:11 PM
My user_settings.php - by Brandin - 11-19-2017, 10:23 PM
My user_settings.php - by shoropio - 11-19-2017, 10:27 PM
My user_settings.php - by mudmin - 11-19-2017, 10:50 PM
My user_settings.php - by shoropio - 11-20-2017, 12:15 AM
My user_settings.php - by dan - 11-20-2017, 01:49 AM
My user_settings.php - by shoropio - 11-20-2017, 02:17 AM
My user_settings.php - by mudmin - 11-20-2017, 01:58 PM
My user_settings.php - by shoropio - 11-20-2017, 02:49 PM
My user_settings.php - by mudmin - 11-20-2017, 04:30 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)