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
/printthread.php 16 require_once



UserSpice
UPDATE FORM - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Documentation (https://userspice.com/forums/forumdisplay.php?fid=30)
+--- Thread: UPDATE FORM (/showthread.php?tid=411)



UPDATE FORM - picassoo - 12-28-2016

Hi again, again I have problem at an Form, I cant update the form what i get from user ID.

here I have my form http://pastebin.com/Yj4F0qZM

can you help me again please ?


UPDATE FORM - mudmin - 12-28-2016

http://pastebin.com/8iYMCJFh

A few notes:
1. You only need DB::getInstance if you are not getting that from the header. It doesn't hurt, but you don't need it. I need to update the database documentation.

2. You were close on your fields array, but on the right side of the array you either need a variable that you created earlier or the input::get to get the info directly from the form.

3. When you're doing your update query, the table name needs to be 'tablename' unless you are using a variable. If you are using a variable, then you don't need quotes.

4. If you do Redirect::to you don't need the word location. Even if header/location doesn't have a problem on your server, it could come up if you ever move servers.

I hope this helps. Did you get my email?


UPDATE FORM - picassoo - 12-28-2016

no is not good Sad(( I need to find someting elesee


UPDATE FORM - picassoo - 12-28-2016

I have your email Tongue


UPDATE FORM - picassoo - 12-28-2016

if(!empty($_POST['gata'])){
$fields = array(
'ratie_star' => Input::get('ratie_star'),
'cat_a_durat' => Input::get('cat_a_durat'),
'este_gata' => Input::get('este_gata'),
'utilizator' => Input::get('utilizator')
);
$taskInsert = $db->update('task',$id,$fields);

}

I got ERORR

Notice: Undefined variable: id in C:\xampp\htdocs\detalii_info_task.php on line 87


UPDATE FORM - picassoo - 12-28-2016

I fix the problem Smile)) in your $taskInsert = $db->update(‘task’,$id,$fields); code is id but must be $ID not $id