Advertisement
adventuretimeh

eseguire_query_php.php

Jul 6th, 2022
820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2. echo"<a href=homepage.html>home</a>";
  3. $con=new mysqli("localhost","root","","esempio");
  4. if(mysqli_connect_errno()){
  5. echo("connesione_non_effetuata:".mysqli_connect_errno()."<BR>");
  6. exit();
  7. }
  8. $sql ="SELECT * FROM registrazione ";
  9. $ris = $con->query($sql) or die ("Query fallita!");
  10. echo "<TABLE>
  11. <TR><TH>email<TH>password</TR>";
  12. foreach($ris as $riga)
  13. {
  14. echo "<TR>";
  15. echo "<TD>".$riga["email"];
  16. echo "<TD>".$riga["password"];
  17. echo "</TR>";
  18. }
  19. $con->close();
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement