Re: <select name=....
| From: | Kath | Date: | Sun, 25 Feb 2001 02:48:30 +0000 |
| Subject: | Re: <select name=.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41530@lists.php.net to get a copy of this message | ||
Don't forget to close the </SELECT>. Netscape doesn't like it without that
sometimes.
- Kath
----- Original Message -----
From: "PHPBeginner.com" <php-general@phpbeginner.com>
To: "Peter Houchin" <peterh@vfsa.com.au>; "PHP MAIL GROUP"
<php-general@lists.php.net>
Sent: Saturday, February 24, 2001 1:16 AM
Subject: RE: [PHP] <select name=....
> No it will give you the same value twice...
>
> you need a loop
>
>
> <SELECT NAME="state" SIZE="1">
> <OPTION VALUE="Canberra">ACT</OPTION>
> <OPTION VALUE="Victoria">VIC</OPTION>
>
>
>
> looping the rows .,...{
>
> echo "<OPTION
VALUE=\"".$row['state']."\">".$row['state_abbr']."</OPTION>
> ";
>
> }
>
> </SELECT>
>
>
> Sincerely,
>
> Maxim Maletsky
> Founder, Chief Developer
>
> PHPBeginner.com (Where PHP Begins)
> maxim@phpbeginner.com
> www.phpbeginner.com
>
>
>
>
>
>
> -----Original Message-----
> From: Peter Houchin [mailto:peterh@vfsa.com.au]
> Sent: Friday, February 23, 2001 1:17 PM
> To: PHP MAIL GROUP
> Subject: [PHP] <select name=....
>
>
> if i have a form with a select box in it how an i get the values to echo a
> php value ...
>
> ie
>
> <SELECT NAME="state" SIZE="1">
> <OPTION VALUE="Canberra">ACT</OPTION>
> <OPTION VALUE="Victoria">VIC</OPTION>
> </SELECT>
>
> can i change it to say
> <SELECT NAME="state" SIZE="1">
> <OPTION VALUE="<? echo $state ?>">ACT</OPTION>
> <OPTION VALUE="<?echo $state ?>">VIC</OPTION>
> </SELECT>
>
> so that when the page loads it shows which ever option is in the Data
base?
>
> Peter Houchin
> Sun Rentals
> peterh@sunrentals.com.au
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>