Hi guys,
I am having some trouble with my drop down fields.
At the moment they work as I want them too, however if the user invokes any of the error checking code that I have put in for my form the whole form refreshes itself.
The text fields stay as they were, giving the user the opportunity to correct them, however the drop down menus all revert to default.
I am trying to add some code so that the drop down menu's (when the page is refreshed after the user has incorrectly added something) remember the user's selection.
<?php
// connect to the database
include('connect-db.php');
$result=mysql_query("select model from b_model");
$options="";
while ($row=mysql_fetch_array($result)) {
$categoryname=$row["model"];
$options.="<OPTION VALUE=\"$categoryname\">".$categoryname;
}
?>
<select name="model_1">
<option >SELECT<?php echo $options ?></option>
}
This is the code for one of my drop down boxes.
Any ideas or hints would be appreciated.
Cheers