The following menu sends a url variable which the query below filters on, for updating a record.
My question is: how can I make the option value ‘hold’ after it is selected and beign passed to url?
<form name="form5" method="get" action="../thissamepage.php">
<select name="JContID">
<?php
do {
?>
<option value="<?php echo $row_jctses['JContID']?>"<?php if (!(strcmp($row_jctses['JContID'], $row_jctses['JName']))) {echo "SELECTED";} ?> <?php echo $row_jctses['JName']?></option>
<?php
} while ($row_jctses = mysql_fetch_assoc($jctses));
$rows = mysql_num_rows($jctses);
if($rows > 0) {
mysql_data_seek($jctses, 0);
$row_jctses = mysql_fetch_assoc($jctses);
}
?>
</select>
<input type="submit" name="Submit2" value=" - Select One -">
</form>
jctses query:
$colname_jctses = "-1";
if (isset($HTTP_SESSION_VARS['login_id'])) {
$colname_jctses = (get_magic_quotes_gpc()) ? $HTTP_SESSION_VARS['login_id'] : addslashes($HTTP_SESSION_VARS['login_id']);
}
mysql_select_db($database_any, $any);
$query_jctses = sprintf("SELECT * FROM JConts WHERE EC_ID=%s ", $colname_jctses);
$jctses = mysql_query($query_jctses, $any) or die(mysql_error());
$row_jctses = mysql_fetch_assoc($jctses);
$totalRows_jctses = mysql_num_rows($jctses);