You are here: Home » All Posts » jQuery

jQuery

Loading a Drop Down List Using jQuery

To load a drop down list (or a simple list) from a database, there are different ways. One is to embed PHP code in the HTML code, that loops through the rows in the database and adds <option> </option> tags. <select name='mylist' id='mylist' size='1'> <?php while($rec = mysql_fetch_assoc($result)) { echo "<option>".$rec['name']."</option>"; } ?> </select> A [...]

Read the full article →