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
Help with $dv->update
#1
Hi

So heres the code I am using... but it doesnt seem to update the db... I cant seem to figure out where I am going wrong:

require_once $abs_us_root.$us_url_root.'users/classes/DB.php';'

$db = DB::getInstance();
$updatestatus = Input::Get('update');
$qid = Input::Get('id');

if ($updatestatus != 1) {
$fields = array(
'author' => $user->data()->id,
'filenumber' => Input::get('internal'),
'content' => Input::get('letterbody'),
'webkey' => Token::generate(),
);
$db->insert('letters',$fields);
Redirect::to('lettersearch.php?msg=Letter+Saved!');
}
else {
$fields = array(
'lastupdatedby' => $user->data()->id,
'filenumber' => Input::get('internal'),
'content' => Input::get('letterbody'),
);

$db->update('letters',$qid,$fields);
dump ($fields);
Redirect::to('lettersearch.php?msg=Letter+Updated!');
}


Any ideas what I am not seeing? There are no errors. If I goto the database, any changes made in any of the fields above do not get updated...
  Reply


Messages In This Thread
Help with $dv->update - by muhammedc - 03-29-2017, 12:47 PM
Help with $dv->update - by mudmin - 03-30-2017, 02:25 PM
Help with $dv->update - by muhammedc - 03-30-2017, 06:22 PM
Help with $dv->update - by mudmin - 03-30-2017, 06:24 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)