Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <select name="">
  2. <?php
  3.  include 'db.php';
  4.  $getUsers=mysql_query('SELECT id, user_name FROM users');
  5.  if(mysql_num_rows($getUsers))
  6.  {
  7.     echo '<select name="users">';
  8.     while($row=mysql_fetch_array($getUsers))
  9.     {
  10.         echo '<option value="',$row['id'],'">',$row['user_name'],'</option>';  
  11.     }
  12.     echo '</select>';
  13.  }
  14.  ?>
  15. </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement