HI
I seem to have a problem with a drop down menu, the code seems to work fine and the values are showing in source code but do not show on the page????
Another issue is I dont know how to move forward after this to make a combo drop down box whereby the selected value of the first box then decides what is populated in the 2nd box and then a selection is made from there to go to that url.
Hope somebody can help.
<head>
<style type="text/css">
#myForm select option:nth-child(odd) {
color:orange;
background:lightgray;
}
#myForm select option:nth-child(even) {
color:orange;
background:white;
font-colour:orange;
}
#myForm select {
background:gray;
color:orange;
}
</style>
</head>
<body>
<form id="myForm" action="#" method="get">
<select name="select1">
<option value="Select Option">Select Option</option>
<?php
$con = mysql_connect("","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Database", $con);
$result=mysql_query("select * from TABLE where Field='whatever' ORDER BY whatever, whatever2");
while($row=mysql_fetch_array($result))
?>
<option value="<?php echo $row['whatever']; ?>" <?php echo $row['whatever2'];?></option>
<?php
}
?>
</select>
</body>
</html>