RE: [PHP] form array

From: Date: Thu, 12 Feb 2004 00:27:44 +0000
Subject: RE: [PHP] form array
Groups: php.general 
Request: Send a blank email to php-general+get-177465@lists.php.net to get a copy of this message
Matthew, use $_POST/$_GET/$_REQUEST (depending on your form method) and foreach() eg: foreach($_POST['image'] as $key=>$value) { echo "$key -> $value<br>\n"; } Martin > -----Original Message----- > From: Matthew Oatham [mailto:matthewoatham@hotmail.com] > Sent: Thursday, 12 February 2004 11:29 AM > To: php-general@lists.php.net > Subject: [PHP] form array > > > Hi, > > I have a form on page1 that i want to submit to another php > page - page2 > > the form has the fields > > <input type="hidden" name="image[one]" value="one"> > <input type="hidden" name="image[two]" value="two"> > <input type="hidden" name="image[three]" value="three"> > > Basically I want to have these form field values as an array > of values I can > loop through on page 2 but what do I put on page 2 too get > the array and > loop through ? > > Thanks.

« previous php.general (#177465) next »