Hello:
I have created a form that verifies required variables once the form has been submitted. I have done it this way for 2 reasons:
1. I don't want to use Javascript to check on the clientside the required fields have been filled in (ie) A dialog box with info on what hasn't been filled in.
2. I don't want to have them direct to another page and have to click the back button or use something to the effect like javascript:history.back(1) to return to the form to fix information required.
The problem that I am having with the code below is that the select menu is selecting everything as "selected". (ie) If I select Option 1 when I hit the Submit Info button Option 3 becomes the default select item. Any ideas on what I can do so the $MenuSelect variable isn't coming up true for every menu item?
Thanks,
Troy
Below is the snippet just for the menu section.
<form method="post" ACTION="<?echo$PHP_SELF?>">
<select name="MenuSelect">
<option>-- Select Item--</option>
<option<? if ($upload && $MenuSelect="Option 1") { echo " selected";}?> value="Option 1">Option 1</option>
<option<? if ($upload && $MenuSelect="Option 2") { echo " selected";}?> value="Option 2">Option 2</option>
<option<? if ($upload && $MenuSelect ="Option 3") { echo " selected";}?> value="Option 3">Option 3</option>
</select>
<input type="submit" name="upload" value="Submit Information">