UnknownPlayer Posted January 7, 2011 Share Posted January 7, 2011 I have this form: <form> <label>Select Country:</label> <select name="country" id="country"> <?php $query = "SELECT * FROM countries"; $result = mysql_query($query, $connection); while ($country = mysql_fetch_array($result)) { $county_id = $country['id']; $county_name = $country['name']; echo '<option value="{$county_id}">'.$county_name.'</option>'; } ?> </select> </form> now i wonna, when someone choose some country, to read from "cities" table all cities which are in choosen country, and to make another <select> for choosing cities.. but without refreshing page.. i mean with js. Can someone help me, please? Link to comment https://forums.phpfreaks.com/topic/223706-help/ Share on other sites More sharing options...
inversesoft123 Posted January 7, 2011 Share Posted January 7, 2011 you can do it with jQuery API. Link to comment https://forums.phpfreaks.com/topic/223706-help/#findComment-1156335 Share on other sites More sharing options...
UnknownPlayer Posted January 8, 2011 Author Share Posted January 8, 2011 Can you give me example? Link to comment https://forums.phpfreaks.com/topic/223706-help/#findComment-1156699 Share on other sites More sharing options...
inversesoft123 Posted January 8, 2011 Share Posted January 8, 2011 http://api.jquery.com/submit-selector/ Link to comment https://forums.phpfreaks.com/topic/223706-help/#findComment-1156715 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.