Nothadoth Posted August 17, 2006 Share Posted August 17, 2006 I am trying to use a select box (drop down) to reload the page on change to determine a variable. But i cant get it to work.Could someone tell me how to do it? Im not sure if it's because it's in php in a print statement or whether i've just coded it wrong. Link to comment https://forums.phpfreaks.com/topic/17893-onchange/ Share on other sites More sharing options...
trq Posted August 17, 2006 Share Posted August 17, 2006 Post the code!!! Link to comment https://forums.phpfreaks.com/topic/17893-onchange/#findComment-76499 Share on other sites More sharing options...
ToonMariner Posted August 17, 2006 Share Posted August 17, 2006 use ajax so you don't have to reloafd the entire page... Link to comment https://forums.phpfreaks.com/topic/17893-onchange/#findComment-76513 Share on other sites More sharing options...
Nothadoth Posted August 17, 2006 Author Share Posted August 17, 2006 [code]select name='tariffselect' size='6' onchange='this.options[this.selectedIndex].value; this.selectedIndex=0;'>"; mysql_connect('localhost','hidden','hidden'); mysql_select_db('noth_igbltduk'); $querysystems= mysql_query('SELECT * FROM phone_tariffs ORDER BY tariff ASC');while($tariff = mysql_fetch_array($querysystems)) { print "<option name='".$tariff['tariff']."'>".$tariff['tariff']."</option>";} print "</select>[/code]how do i use ajax :S Link to comment https://forums.phpfreaks.com/topic/17893-onchange/#findComment-76517 Share on other sites More sharing options...
HeyRay2 Posted August 18, 2006 Share Posted August 18, 2006 http://www.ajaxfreaks.com/tutorials.php Link to comment https://forums.phpfreaks.com/topic/17893-onchange/#findComment-76525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.