PHP, Javascript, HTML
How to get option value in PHP? And i want to redirect to the same page, if option is changed by using onClick() function. Anybod开发者_高级运维y please help me.
Javascript :
Use eleement_id.selectedIndex() function , It will give the selected option properties.
.......
<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'];
精彩评论