Advertisement
Guest User

Untitled

a guest
Jun 21st, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1.  
  2. <? $apparecchio=intval($_GET['client_id']);
  3. $link = mysql_connect('localhost', 'root', ''); //changet the configuration in required
  4. if (!$link) {
  5.     die('Could not connect: ' . mysql_error());
  6. }
  7. mysql_select_db('gecko');
  8. $query="SELECT id, client_id, tipo_apparecchio, modello FROM apparecchi where $client = apparecchi.client_id";
  9. $result=mysql_query($query);
  10.  
  11. ?>
  12.  
  13.  
  14. <select name="apparecchio">
  15. <option>Seleziona Apparecchio</option>
  16. <? while($row=mysql_fetch_array($result)) { ?>
  17. <option value=<?=$row['id']?>><?=$row['modello']?></option>
  18. <? } ?>
  19. </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement