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? Quote Link to comment Share on other sites More sharing options...
inversesoft123 Posted January 7, 2011 Share Posted January 7, 2011 you can do it with jQuery API. Quote Link to comment Share on other sites More sharing options...
UnknownPlayer Posted January 8, 2011 Author Share Posted January 8, 2011 Can you give me example? Quote Link to comment Share on other sites More sharing options...
inversesoft123 Posted January 8, 2011 Share Posted January 8, 2011 http://api.jquery.com/submit-selector/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.