how to open the site selected in dropdown menu?
Posted: Mon Oct 11, 2010 2:33 am
Hi,
got a question.
If I take for example word in my dropdown menu, and I click the button, I want it to open for example word.htm, if I take Excell in dropdown menu I want to open excell.htm
Can someone help me with showing the code, cause I tried a lot but can't find it..
Tyvm
got a question.
If I take for example word in my dropdown menu, and I click the button, I want it to open for example word.htm, if I take Excell in dropdown menu I want to open excell.htm
Can someone help me with showing the code, cause I tried a lot but can't find it..
Tyvm
Code: Select all
<body>
<form method="post" action="<?php echo $PHP_SELF ?>">
<select name ="lessen_id">
<?php
$db = mysql_connect("localhost", "root")
or die ("Kan niet verbinden: " . mysql_error());
mysql_select_db("lessen", $db);
$sql = "SELECT * FROM lessen";
$resultaat = mysql_query($sql); //Voer SQL code uit
while ($rij = mysql_fetch_array($resultaat)) {
echo "<option value =\"";
echo $rij["lessen_id"]. "\">";
echo $rij["naam_lessen"]. "</option>\n";
}
mysql_close($db);
?>
</select>
</form>
<?php
echo "<input type=\"submit\" name=\"artikelnaam\" value=\"More information....\">";
?>
</body>