Guest User

Untitled

a guest
Mar 16th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <html>
  2. <body>
  3. <?php
  4. $username="orisuorg_omicro";
  5. $password="mgpasswd";
  6. $database="orisuorg_omicrodb";
  7. $host="mysql.netsons.org";
  8.  
  9. mysql_connect($host,$username,$password);
  10. @mysql_select_db($database) or die("Impossibile selezionare il database.");
  11. $query="SELECT * FROM Eventi";
  12. $risultati=mysql_query($query);
  13.  
  14. $num=mysql_numrows($risultati);
  15.  
  16. mysql_close();
  17.  
  18. echo "<b><center>Database Output</center></b><br><br>";
  19.  
  20. $i=0;
  21. while ($i < $num) {
  22. $nome=mysql_result($risultati,$i,"nome");
  23. $cognome=mysql_result($risultati,$i,"cognome");
  24. $eta=mysql_result($risultati,$i,"eta");
  25.  
  26. echo "<b>$nome $cognome</b><br>$eta<br><br>";
  27.  
  28. $i++;
  29. }
  30.  
  31. ?>
  32. </html>
  33. </body>
Add Comment
Please, Sign In to add comment