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

http://localhost/vehicle2/?car_type=0&pickup=0&return=0&residence_two=international&driver_age=25%2b&passengers=no.+of+passengers&search=

http://localhost/vehicle2/?car_type=0&pickup=0&return=0&residence_two=international&driver_age=21-24&passengers=no.+of+passengers&search=

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

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -