how to navigate page using combolist
Posted: Sat Aug 22, 2009 3:33 pm
hi everyone,
i`m new in php language..
what i need is.. i have combolist with 9 options.. if user chose any option i need to navigate them to page that related to what he chose
e.g: if he chose option 1 and press submit then browser navigate to page related to option 1 and so on so far
so how to do this..?
this is where i stop in my code:
i hope you understand what i mean
i`m new in php language..
what i need is.. i have combolist with 9 options.. if user chose any option i need to navigate them to page that related to what he chose
e.g: if he chose option 1 and press submit then browser navigate to page related to option 1 and so on so far
so how to do this..?
this is where i stop in my code:
Code: Select all
<html>
<body>
<form action="list.php" method="post">
<p>Select your stock<br>
<select name="select">
<option value="Option 1" selected>Bank Sector</option>
<option value="Option 2">----------</option>
<option value="Option 3">NBK</option>
<option value="Option 4">GBK</option>
<option value="Option 5">CBK</option>
<option value="Option 6">ABK</option>
<option value="Option 7">BKME</option>
<option value="Option 8">KIB</option>
<option value="Option 9">BURG</option>
<option value="Option 10">KFIN</option>
<option value="Option 11">BOUBYAN</option>
</select>
<input type="submit" />
</form>
</p>
</body>
</html>
Code: Select all
<html>
<body>
<?php
if ($_POST['select'] == "Option 3"){
[color=#BF0000]what to write here so i can navigate to other page[/color]
}
?>
</body>
</html>
i hope you understand what i mean