Pikachu2000;10947429 wrote:Yes, it's possible.
$query = "UPDATE table SET $field = $value"; with $field as the value of the dropdown from the previous form, and $value based on the input from this form. This will update all records in that table to have the new value in the specified field.
Hi, I have the same code in my PHP pages to uptade my tables, but...
I've created a secondary PHP page with access to just a few field in the record to edit, but, when I apply the update, it does change the info, but... all other fields not available are deleted of the talbes' record.
How can I update just certain field in the record leaving the rest intact?
I use this to update the table...
$sql = "update intake_easy set medicare_name = '".$medicare_name."',dob = '".$dob."',state = '".$state."',p_insurace = '".$p_insurace."',ssn = '".$ssn."',pre_status = ".$pre_status.", pre_status_reason = '".$pre_status_reason."',K0011 = '".$K0011."',K0823 = '".$K0823."',K0014 = '".$K0014."',K0825 = '".$K0825."',K0800 = '".$K0800."',K0827 = '".$K0827."' ,parteadate = '".$parteadate."' ,partebdate = '".$partebdate."', v_note = '".$v_note."' where id = ".$intake;
$result = mysql_query($sql,$conn) or die (mysql_error());;
There are about 20 field more, and all of them are deleted (updated to blank) when I apply the update, is there any way to leave them with out change??
Alex