I need to update multiple records in a single form but am not sure how to proceed. The following is the code I am using to insert the fields into the database originally.
$case = date(ymdHis);
//register into database
if (!empty($p1_firstname)) mysql_query ("INSERT INTO cases VALUES ('$case','$date_booked','$p1_firstname','$p1_lastname ''$city’)");
if (!empty($p2_firstname)) $register_case = mysql_query ("INSERT INTO cases VALUES ('$case','$date_booked','$p2_firstname','$p2_lastname','$city’)");
I have an update form which displays data for however many records there are for each "case". How can I use UPDATE to edit information in different rows when each row has the same identifier ($case)?