Re: Help with POSTing variable array names from a PHP script please.

From: Date: Sat, 15 Feb 2003 20:44:45 +0000
Subject: Re: Help with POSTing variable array names from a PHP script please.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-135705@lists.php.net to get a copy of this message
On Saturday 15 February 2003 18:38, rentAweek support wrote: > Jason > > Thanks for your help . > > I've implemented you advice. The problem persists in that I'm trying > create the following situation: > When the posted action php script runs I want the retrieved $_POST array > to contain such information that the action script can find out what > checkboxes were clicked and from there the library books to retrieve. > So what do I need to write: > 1. for the checkbox line in the driving script, e.g. > > type="checkbox" name="???" value ="ON" type="checkbox" name="book[$booksid]" value ="ON" > 2. in the action script, e.g. > > $result = $_POST[???]; if (isset($_POST['book'])) { foreach ($_POST['book'] as $book) { echo "$book<br>"; } } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* QED. */

« previous php.general (#135705) next »