Web EndMemo

HTML Select Option

Let's see a Select Option example:



The main HTML code:
<FORM name=tt action="<?PHP $_SERVER['PHP_SELF']?>" method="post">
<select name=sel style="font-size:20px;width:140px">
<option value="images" selected>images</option>
<option value="tags" <?PHP if ($select == "tags") 
echo "selected";?>>tags</option>
<option value="basicpage" <?PHP if ($select == "basicpage") 
echo "selected";?>>basicpage</option>
<option value="form" <?PHP if ($select == "form") 
echo "selected";?>>form</option></select><br>
<input type=submit name="submit">
<?PHP
if ($flag == 1 && isset($_POST['submit'])) 
echo "<br><br><font color=\"red\">Your selected $radiobox.</font>\n";
?>


The PHP code for handling the radio button is:
<?PHP
$select="";
if (isset($_POST['submit']))
{
	$select = $_POST['sel'];
}
?>