...

View Full Version : select by GET



sonny
11-20-2012, 08:41 PM
Hi, what is proper way to auto select one
of these below based on a GET value?



$sel = $_GET['country'];

<TD>
<SELECT NAME="LOCATION">
<OPTION VALUE="<?php $sel ?>">
<OPTION VALUE="Austria">Austria
<OPTION VALUE="Denmark">Denmark
<OPTION VALUE="Germany">Germany
</SELECT>
</TD>


Thanks
Sonny

tangoforce
11-20-2012, 08:49 PM
<OPTION VALUE="<?php $sel ?>" selected="selected">

No I don't know why selected is not true/false and is the same value as its name.. it's daft if you ask me.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum