I am trying to pass a few variable from a user form. Some of the variables come from an input box while others come from drop down menus.
The data from the input boxes pass fine, the data from the drop down menus only pass upon a second submission.
Here is a snippet of the form page:
<?php
session_start();
$SESSION['variable1'];
$SESSION['variable2'];
?>
<input type='text' size='12' name='variable1' onFocus="this.value=''" value='enter variable'><br>
<?php echo "
<select size='1' name='variable2'>
<option value='' selected>default</option>
<option value='Option1'>Option1</option>
<option value='Option2'>Option2</option>
<br>
"; ?>
The form calls to action another file which now just checks the passing of the variables:
<?php
session_start();
?>
<?php
echo $variable1;
echo $variable2;
?>
Variable1 has no problem passing.
Variable2 never passes the first time, BUT if i click submit on the form a second time it correctly passes. It will continue to pass data on subsequent requests in that same browser.
Once i close the browser and try again in a new browser variable2 once again doesn't pass but then does on subsequent tries.
Any ideas why this may be happening?
Worked fine in a previous version of php but then my host upgraded to 4.3.3 (i think) and now it no longer works.
Thank you in advance for any help or insight.