Hi All,
Im having some confusion trying to accomplish the following.
I have a php script that's echoing html statements. the html statements produce a little form that has a table in it. The user enters data into the form, and on submit the user entered data are dumped into the $_GET variable. Simple. However, Ive got a select statement, inside the form, that looks somthing like:
echo '<select name="latlong_option"onchange="window.location=this.options[this.selectedIndex].value">';
echo '<select name="latlong_option" onchange="acqplan_e.php">';
echo '<option value="acqplan_e.php?latlong_option=dms" onmouseup="acqplan_e.php">select</option>'."\r\n";
echo '<option value="acqplan_e.php?latlong_option=dd" onmouseup="acqplan_e.php">Decimal degrees</option>'."\r\n";
echo '<option value="acqplan_e.php?latlong_option=dms" onmouseup="acqplan_e.php">Degree, min., sec.</option>'."\r\n";
echo '</select>';
Basically what's going on is the user is entering coordinates, they can select either decimal degrees or degree, min, sec. Depending on what the user selects the form displays with either single inputboxes (for decimal degrees) or sets of three input boxes (for deg, min, sec). ... if $_SESSION['latlon'] = 'dd', one bit of code is executed to show single input boxes, if the value is dms, another set of code runs.
My problem is this: besides the coordinates, the user will also be entering other data. when the user makes a selection with the above code, the form and table are redrawn to reflect the change and the previously entered data are lost. How can I save this data and print it back to the form after a selection is made?