checkboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
		}

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux