I have a form starting with a drop down menu i.e.
when a choice is selected the form submits itself back onto the same page and registers the choice as a variable
the problem is that i want to show the variable as the default choice in the drop down menu when the user continues the form rather than reverting back to "Select Gang..." (As this causes it to lose the variable when the form is submitted again)
I have tried various ways but to no avail i.e.
Any suggestions?
Thanks in Advance
Code:
<select name="gangs" onchange="submit()">
<option value="">Select Gang...</option>
<option value="A1">HanA - Shop 1</option>
<option value="A2">HanA - Shop 2</option>
<option value="B1">HanB - Shop 1</option>
<option value="B2">HanB - Shop 2</option>
</select>
Code:
$GangNumber = $_POST['gangs'];
I have tried various ways but to no avail i.e.
Code:
selected="<? echo $GangNumber; ?>"
Any suggestions?
Thanks in Advance