Re: confusing problem or am just plain confused....

From: Date: Tue, 10 Jun 2003 19:45:26 +0000
Subject: Re: confusing problem or am just plain confused....
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-150962@lists.php.net to get a copy of this message
On Tue, Jun 10, 2003 at 03:27:10PM -0400, CPT John W. Holmes wrote: > > I dont know how exactly to explain this but will do my best, i have many > of > > the following lines in a page: > > > > <td><p><input type=checkbox name='id[]' value=23><input > > type="hidden" name > > ="package" value="loco package"></td> > > <td><p><input type=checkbox name='id[23]' value="loco > package"></td> Further to that... if you need to add more columns of information. Let's say: Text Name name="textname[id]" Checkbox name="checkbox[id]" Different checkbox name="otherchkbox[id]" If you set them all up to use arrays, you can process the form quite nicely like this: foreach ($_POST["textname"] as $id => $value) { // access other items with: $checkbox = $_POST["checkbox"][$id]; $other = $_POST["otherchkbox"][$id]; } I'm sure there are other ways of doing it, but that's the one I like. :) emma -- Emma Jane Hogbin [[ 416 417 2868 ][ www.xtrinsic.com ]]

« previous php.general (#150962) next »