Guest User

Untitled

a guest
Aug 16th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Gestione Libreria</title>
  4. </head>
  5.  
  6. <body>
  7. <?php
  8. $host = 'sql.leonardoallegrini.eu';
  9. $user = 'leonardo49701';
  10. $password = 'leon17290';
  11. $database = 'leonardo49701';
  12. $a = $_Request[Libro];
  13.  
  14. $db = mysql_connect($host,$user,$password)
  15. or die ("Impossibile connettersi al Server");
  16.  
  17. mysql_select_db($database, $db)
  18. or die ("Impossibile connettersi al Database");
  19.  
  20. $query = "SELECT Nome , Cognome FROM Utente WHERE Libro = $_Request[Libro];
  21. $dbResult = mysql_query($query, $db);
  22. $num_rows = mysql_num_rows ($dbResult);
  23.  
  24. echo "<table>\n";
  25. while ($line = mysql_fetch_array($result, num_rows)) {
  26. echo "\t<tr>\n";
  27. foreach ($line as $col_value) {
  28. echo "\t\t<td>$col_value</td>\n";
  29. }
  30. echo "\t</tr>\n";
  31. }
  32. echo "</table>\n";
  33.  
  34. mysql_free_result($dbResult);
  35. mysql_close($db);
  36. ?>
  37.  
  38.  
  39. </body>
  40. </html>
Add Comment
Please, Sign In to add comment