Jump to content

Archived

This topic is now archived and is closed to further replies.

Nothadoth

<select> onChange

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.