Re: Multiple checkboxes

From: Date: Thu, 07 Aug 2003 00:39:48 +0000
Subject: Re: Multiple checkboxes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29731@lists.php.net to get a copy of this message
Mike Baerwolf wrote:
Hello, I'm trying to get the values from a form post with multiple checkboxes checked . Here is what I have, if ($row = mysql_fetch_array($result)); do { <input type=checkbox name=class_id[] value=$row[class_id]> $row[name]
Try putting quotes around your attribute values... <input type=checkbox name="class_id[]" value="$row[class_id]"> Also, I assume you have an "echo" somewhere? Like: echo "<input type=checkbox name=\"class_id[]\" value=\"{$row[class_id]}\">"; -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.db (#29731) next »