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
Unable to update a field in a custom table
#1
In the edit_profile.php, i modified it to update a payment field in a Members table but it is not updating.

         //Update Payment Type
        if ($userdetails->payment_type != $_POST['payment_type']){
            $payment_type = ucfirst(Input::get("payment_type"));
            $fields=array('payment_type'=>$payment_type);
            $validation->check($_POST,array(
                'payment_type' => array(
                    'display' => 'Payment Type',
                    'required' => true,
                    'min' => 1,
                    'max' => 255
                )
            ));
            if($validation->passed()){
                $db->update('users',$userId,$fields); I changed it to this ->([b]$db->update('member',$userId,$fields)[/b]
                $successes[]='Payment Type updated.';
                                logger($user->data()->id,"User","Changed payment_type from $userdetails->payment_type to $payment_type.");
            }else{
                //validation did not pass
                foreach ($validation->errors() as $error) {
                    $errors[] = $error;
                }
            }
        }else{
            $payment_type=$userdetails->payment_type;
        }


What am i doing wrong?
  Reply


Messages In This Thread
Unable to update a field in a custom table - by eforbes - 10-02-2018, 11:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)