Take the following example:
<select name="package" style="FONT-FAMILY: Verdana; FONT-SIZE: 11px">
<option value="hostingbronze" >HOSTING: Bronze</option>
<option value="hostingsilver" >HOSTING: Silver</option>
<option value="hostinggold" >HOSTING: Gold</option>
<option value="hostingplatinum" selected>HOSTING: Platinum</option>
<option value="resellerstartup" >RESELLER: Startup</option>
<option value="resellerpro" >RESELLER: Professional</option>
<option value="resellerenterprise" >RESELLER: Enterprise</option>
<option value="resellerenterpriseplus" >RESELLER: Enterprise+</option>
</select>
This displays a listbox with a number of options, but the "hostingplatinum" option is selected by default.
I would like to be able to provide the "selected" option via a URL, e.g. http://mydomain.com/select.php?package=resellerstartup.
How can I code this with PHP so the selected option appears dynamically based on the URL supplied? Ideally I should still be able to provide a default option if no variable is passed on the URL.
Thanks,
MercuryMan