Guest User

Untitled

a guest
Mar 7th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $db = mysql_connect("localhost", "root", "");
  4. mysql_select_db("siteweb");
  5. mysql_set_charset('utf8');
  6.  
  7.  
  8.  
  9.  
  10.         echo  "<select id='nomes' name='nomes' type='int'>";
  11.        
  12.         echo '<option value="--1">La Liste Des Enseignants</option>'."\n";
  13.        
  14.         $result = mysql_query("SELECT nomes FROM enseignant" );
  15.        
  16.         while($data =  mysql_fetch_array($result))
  17. {
  18.     echo '<option value="'.$data[0].'">'.$data['nomes'];
  19.     echo '</option>'."\n";
  20. }
  21.        
  22.  
  23.      
  24.  
  25.         echo ' </select>';
  26.  
  27.  
  28.      
  29.  
  30.  
  31.    
  32.  
  33.  
  34.    
  35.    
  36. mysql_close();
  37.  
  38.  
  39.  
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment