How to get option value in PHP? And i want to redirect to the same page, if option is changed by using onClick() function. Anybody please help me.
+1
A:
Javascript :
Use eleement_id.selectedIndex() function , It will give the selected option properties.
pavun_cool
2010-03-05 06:39:58
he said "option value" not text of selected option.
Sarfraz
2010-03-05 06:42:22
+1
A:
.......
<select name="select" onchange="document.location.href='this-page-name.php?val=' + this.value">
options....
</select>
You can get its value like this:
echo $_GET['val'];
Sarfraz
2010-03-05 06:41:34