Drop Down From Sql - Mysql

Drop down from sql in php

Snippet Code


  
Rate this page :
  [ 0 votes]

This code can be used to display the drop down list from mysql

<select name='drop-down'> <?php $query = mysql_query('select * from "tablename" '); while($row=mysql_fetch_array($query)) { $name=$row['name']; echo "<option>$name</option>"; } ?>

Tags


Ask Questions

Ask Question