Thanks Traq, you pushed me to have a try with <select>.
I have prepared a small example with two select drop down lists. But I run into a problem: I would like to have the two drop down lists in a table, one list in a cell, the other in another cell. But I don't find the correct way. Can someone help me?
You can test my example here.
Here what I did:
PHP Code:
<?php
session_start();
echo "<form name=\"aaaa\" method=\"post\" action=\"sessions_select_page2.php\">";
?>
<?php
function select( $selection , $values )
{
echo "<select name=\"$selection\">\n";
foreach( $values AS $val ) {
if ( isset( $_SESSION["$selection"] ) AND $_SESSION["$selection"] == $val )
$selected = " selected=\"selected\"";
else
$selected = "";
echo "\t<option value=\"$val\"$selected>$val</option>\n";
}
print "</select>\n";
}
echo 'Please choose item 1:'; select( "selection1" , array( "0", "6", "12", "18" ) );
echo '<br/>Please choose item 2:'; select( "selection2" , array( "0", "6", "12", "18" ) );
?>
<br/><br/>
<input type="submit" name="submit" value="order now" />
Bookmarks