Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ?>
- <select name="names">
- <?php
- $query = mysql_query("select username from users order by user_id ASC");
- if(mysql_num_rows($query) >0){
- //output data
- while ($row = mysql_fetch_assoc($query)){
- echo "<option name=\"". $row['username']. "\">" . $row['username'] . "<option/>";
- }
- }
- else{
- echo "error";
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment