It looks like you're new here. If you want to get involved, click one of these buttons!
<html>
<head>
<title>My Page</title>
</head>
<body>
<form name="myform" action="display.php">
<div align="center">
<select name="mydropdown">
<option value="color1">black</option>
<option value="color2">red</option>
<option value="color3">Orange</option>
</select>
</div>
</form>
</body>
</html>
Comments
The way these works is that when the form is submitted it passes the value of the selected option to the forms action in this case display.php
On display.php you can then access the value of the selected item using the lists name...
Like this:
[PHP]echo $_POST[mydropdown];[/PHP]
If for example the option of red was chosen then the above would display the word "color2". Its shows that because that is the value of the red option on page1.php
You could then do something like this:
[PHP]switch($_POST[mydropdown)
{
case "color1":
echo "Color is Black";
break;
case "color2":
echo "Color is Red";
break;
case "color3":
echo "Color is Orange";
break;
default:
echo "No color selected";
}
[/PHP]
Make sense?
The Royal Ram
Glad to help
The Royal Ram