foreach( $inactive as $inactivesel )
{
$activity = '0';
$query2 = "UPDATE pharmacies SET activity = '$activity', time = NOW(), Address_Line_1 = '$add1', Address_Line2 = '$add2', City = '$city', Province = '$province', Postal_Code = '$postal' WHERE Ph_ID = '$inactivesel' ";
$result2 = mysql_query($query2) or die ("Error in query: $query2. " . mysql_error());
}
This statement updates my database marking records inactive via a checkbox... It works great but I want the user to be able to update the inactive records by going through the edit proccess and "not" checking the box, hence the record marking itself as active again.
Is this possible? Does anyone have any suggestions on how I might accomplish this?
In addition, if the user does not select the "inactive" checkbox and updates the record I get a nasty error message.
Warning: Invalid argument supplied for foreach() in /home/neo10010/public_html/proretail/update.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at /home/neo10010/public_html/proretail/update.php:25) in /home/neo10010/public_html/proretail/update.php on line 33