Re: to array or not to array..
| From: | Justin Patrin | Date: | Mon, 12 Jan 2004 21:47:23 +0000 |
| Subject: | Re: to array or not to array.. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174379@lists.php.net to get a copy of this message | ||
The way I deal with this is one of two ways. An easy way is to populate hidden fields in the page with the indexes of the users, thwn loop through those, checking the indexes of the arrays sent back.
<input type="hidden" name="userIds[]" value="5"/>
User 5 <input type="checkbox" name="userCanDelete[5]"/>
<input type="hidden" name="userIds[]" value="7"/>
User 7 <input type="checkbox" name="userCanDelete[7]"/>
Another is to loop through, say, records from the DB and use their IDs for the indexes of the arrays.
--
paperCrane <Justin Patrin>null