how to insert in different table? May 12, 2020, 12:49:31 PM My problems with inserting and updating are not over yet!in docs/add page, I made an afterAdd event in page Events as follow:$table_data = array( "doc" => $modeldata['doc'], "doc_id" => $modeldata['doc_id'], "part_id" => $modeldata['part_id'], "company_id" => $modeldata['company_id'] );$db->insert("sales", $table_data);it is working perfect except for $modeldata['doc_id']Notice: Undefined index: doc_id in C:\xampp\htdocs\stock_3\app\controllers\DocsController.php on line 231I try everything I know so far, I can't get print_r($_POST) data as it go true the controller and redirect...What I know so far is that: 'doc_id' is the only column in 'sales' table that is not in 'docs' tableWhat I think is happening phprad is cutting doc_id from POST data due to some reasons ?help please? Quote Selected
Re: how to insert in different table? Reply #1 – May 12, 2020, 08:14:50 PM [solved]I'm so stuck to phprad, that I forgot $_POST$table_data = array( "doc" => $modeldata['doc'], "doc_id" => $_POST['doc_id'], "part_id" => $modeldata['part_id'], "company_id" => $modeldata['company_id'] );$db->insert("sales", $table_data); Quote Selected 1 Likes