checkboxes

From: Date: Fri, 21 Jan 2005 21:02:51 +0000
Subject: checkboxes
Groups: php.db 
Request: Send a blank email to php-db+get-38255@lists.php.net to get a copy of this message
I have a form that display's a checkbox if the value is NULL. The form is in a do... while loop, so the user may check multiple checkboxes. 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.
}

« previous php.db (#38255) next »