Re: How to emulate phpMyadmin for editing with checkboxes

From: Date: Thu, 24 Feb 2005 21:26:12 +0000
Subject: Re: How to emulate phpMyadmin for editing with checkboxes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38658@lists.php.net to get a copy of this message
Mahmoud Badreddine wrote:
I changed my checkbox statement to looke like the following: <INPUT type="checkbox" name="isSelected[]" value="<?php $row['ID'] ?>" > where "ID" is the name of the auto-incremental id of my table. This is the output I get from my post_r debug statement: [isSelected] => Array
       (
           [0] =>
           [1] =>
           [2] =>
       )
Look at the HTML that's generated. I'll bet that $row['ID'] doesn't have the value you think it does, so you're creating empty values for each of the checkboxes. Since you said leaving the value attribute out gives you "on" for each one, this has to be the case. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#38658) next »