Siggles Posted February 18, 2009 Share Posted February 18, 2009 Any ideas will this will not work... case "updateinv": foreach ($_POST['markedinv'] as $key => $val){ echo "Key: $key; Value: $val<br />\n"; $query = mysql_query("UPDATE timesheet SET marked_invoiced='1' WHERE log_id = '$val' "); } foreach ($_POST['cat'] as $key2 => $val2){ echo "Key: $key2; Value: $val2<br />\n"; $query2 = mysql_query("UPDATE timesheet SET marked_invoiced='0' WHERE log_id = '$val2' "); } but this will case "updateinv": foreach ($_POST['markedinv'] as $key => $val){ echo "Key: $key; Value: $val<br />\n"; $query = mysql_query("UPDATE timesheet SET marked_invoiced='1' WHERE log_id = '$val' "); } The echos work for both arrays so I know they exist. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 18, 2009 Share Posted February 18, 2009 try echoing mysql_error to see if query fails (and what is the reason) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.