I am trying to pass the variable of each checkboxes to an update statement in MySQL. THe problem is I am only getting one of the checkboxes, even if all of them are checked. Here is my code block, any help would be great. - Craig
//From form page <form> <input type='checkbox' name='completed' value='Done' > </form>
//MySQL Update Page $email = $_POST['email'] == $route; $completed = $_POST["completed"] == $route; $route_name = trim($_POST["route_name"]) == $route; $user_id = $_POST['user_id'] == $route; $id = $_POST['id'] == $route;
$route = array(id => "$_POST[id]", completed => "$_POST[completed]", route_name => "$_POST[route_name]", user_id => "$_POST[user_id]");
foreach ($route as $key => $values) { echo("<br />"); echo $values; //MySQL Update statement will go here. }
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php