Re: How to emulate phpMyadmin for editing with checkboxes

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

 



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

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