Advertisement
Guest User

Untitled

a guest
May 20th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2. $servername = "localhost";
  3. $username = "root";
  4. $password = "123456";
  5.  
  6. $db = new mysqli($servername, $username, $password);
  7.  
  8. if($db->connect_errno == 0)
  9. {
  10.     echo("conn succes");
  11. }
  12.  
  13. $res = $db -> query('select * from potluck')
  14.  
  15. $rows = mysqli_fetch_assoc($res);
  16.  
  17. if ($rows != 0)
  18. {
  19.     echo("found smth !!")
  20. }
  21. $res -> free();
  22. $db -> close();
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement