Forum Moderators: coopster
Javascripts onChange function is what you are looking for I think. Something like this will work:
<select name="select" onChange="location=this.options[this.selectedIndex].value">
<option value="index.php?country=England">England</option>
<option value="index.php?country=hongkong">Hong Kong</option>
<option value="index.php?country=us">US</option>
</select>
When your page reloads, use the $_GET variable set by the script.
Maybe that helps?
dc
He said without Javascript!
You can't reload the page automaticaly without javascript. What you can try is to make <option> links, eg:
<option><a href="i.php?o=England">England</a></option>
<option><a href="i.php?o=Hongong">Hong Kong</a></option>
<option><a href="i.php?o=USA">USA</a></option>
but I'm not sure if this will validate.
You can always add a button <input type="submit"> and get the value in php with $_GET.
1st way:
make column with countries, that is linked
<p><a href=index.html?country=England>England</a><br>
<a href=index.html?country=Holand>Holand</a><br>
<a href=index.html?country=USA>USA</a><br>
<a href=index.html?country=RPA>RPA</a></p>
2nd way:
make a form and a button to submit:
<form action="index.html" method="POST">
<select name="country" id="country">
<option>England</option>
<option>Holand</option>
<option>USA</option>
<option>RPA</option>
</select></form>
in 1st way index.html you have the country in variable $_GET["country"]
in 2nd way you have it in the $_POST["country"] however not straight forward, only by a number of selection.
With javascript there's no problem I presume!
Ask yourself one question: Is it worth bothering?
Best regards
Michal Cibor