php - How to change the url of page based on selectbox values? -
i have php search filter page in used different fields..one of them age of youngest driver field have 2 values 21-24 , 25+ ..basically want keep selected values in select box after search user know searched ..what happen when select 25+ field , click on search goes 21-24 . page connected top database picks values database enter database screenshot below please check , let me know if have solution
<select class="half" id="form_frame" name="" onsubmit="getdata(this);"/> <option id="value1" value="21-24" selected="selected">21-24</option> <option id="value2" value="25+">25+</option> </select> when slect values field , selct 25+ driver age field url
i want driverage=21-24 instead of driver_age
apply onchange event in javascript follows if using jquery
jquery(function () { jquery("#form_frame").change(function () { var id = jquery(this).val();; location.href = "http://localhost/php-page/option"+id+"="+id }) })
Comments
Post a Comment