<select name=....
| From: | Peter Houchin | Date: | Fri, 23 Feb 2001 04:16:33 +0000 |
| Subject: | <select name=.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41258@lists.php.net to get a copy of this message | ||
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