RE: [PHP] Stings .. Strings .. Strings .. help
| From: | John Holmes | Date: | Mon, 16 Sep 2002 16:21:54 +0000 |
| Subject: | RE: [PHP] Stings .. Strings .. Strings .. help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116538@lists.php.net to get a copy of this message | ||
Show your code (partial), it works.
---John Holmes...
> -----Original Message-----
> From: Mohd_Q [mailto:ma1420@hotmail.com]
> Sent: Monday, September 16, 2002 11:49 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Stings .. Strings .. Strings .. help
>
> I forget to say that the values in the form are in drop-down not text
> boxes.
>
> ----- Original Message -----
> From: "Mohd_Q" <ma1420@hotmail.com>
> To: <php-general@lists.php.net>
> Sent: Monday, September 16, 2002 6:46 PM
> Subject: Re: [PHP] Stings .. Strings .. Strings .. help
>
>
> > Unfortunately, no .. it doesn't work.
> >
> > I think if I do it using {}, it might work.
> >
> > Thanks J. Holmes.
> >
> > ----- Original Message -----
> > From: "1LT John W. Holmes" <holmes072000@charter.net>
> > To: "Mohd_Q" <ma1420@hotmail.com>; <php-general@lists.php.net>
> > Sent: Monday, September 16, 2002 6:38 PM
> > Subject: Re: [PHP] Stings .. Strings .. Strings .. help
> >
> >
> > > Say you have 3 text boxes, like this:
> > >
> > > <input type='text' name='var[]' value='one'>
> > > <input type='text' name='var[]' value='two'>
> > > <input type='text' name='var[]' value='three'>
> > >
> > > Then, on your processing page, you'll have a variable
$_POST['var']
> > that'll
> > > be an array that'll contain the contents of each text box.
> > >
> > > $_POST['var'][0] => one
> > > $_POST['var'][1] => two
> > > $_POST['var'][2] => three
> > >
> > > Does that help?
> > >
> > > ---John Holmes...
> > >
> > > ----- Original Message -----
> > > From: "Mohd_Q" <ma1420@hotmail.com>
> > > To: <php-general@lists.php.net>
> > > Sent: Monday, September 16, 2002 11:30 AM
> > > Subject: Re: [PHP] Stings .. Strings .. Strings .. help
> > >
> > >
> > > > Thanx J. Holmes ...
> > > >
> > > > Good suggestion ..
> > > >
> > > > I did try that but how to get results .. I failed too.
> > > >
> > > > Mohd Q.
> > > > ----- Original Message -----
> > > > From: "1LT John W. Holmes" <holmes072000@charter.net>
> > > > To: "Mohd_Q" <ma1420@hotmail.com>;
> > > > <php-general@lists.php.net>
> > > > Sent: Monday, September 16, 2002 6:31 PM
> > > > Subject: Re: [PHP] Stings .. Strings .. Strings .. help
> > > >
> > > >
> > > > > Name your form elements as var[ ], instead of var1, var2, etc,
and
> > > you'll
> > > > > already have an array with $_POST['var'] that holds the
values.
> > > > >
> > > > > ---John Holmes...
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Mohd_Q" <ma1420@hotmail.com>
> > > > > To: <php-general@lists.php.net>
> > > > > Sent: Monday, September 16, 2002 11:21 AM
> > > > > Subject: [PHP] Stings .. Strings .. Strings .. help
> > > > >
> > > > >
> > > > > Help .. please ..
> > > > >
> > > > > There is a form where I have variables
> > > > >
> > > > > var1 , var2 , var3, var4 ...
> > > > >
> > > > > ok ..
> > > > >
> > > > > when these variables are submitted, I tried to assign them to
an
> > array
> > > > > BUT I FAILED .
> > > > >
> > > > > I tried something like :
> > > > >
> > > > > while ($i <= $varCount){
> > > > > $tchr[$i] = $_POST["({var$i})"];
> > > > > $i++;
> > > > > }
> > > > >
> > > > > but no good ..
> > > > >
> > > > > any help ..
> > > > >
> > > > > Thanx
> > > > >
> > > > > MQ.
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit:
> > > > > http://www.php.net/unsub.php
> > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > > http://www.php.net/unsub.php
> > > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php