Guest User

Untitled

a guest
Mar 19th, 2018
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. include_once 'dbh.php';
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <body>
  7. <?php
  8.  
  9. $host="localhost";
  10. $user="utsav";
  11. $pass="root";
  12. $dbname="loginsystem";
  13.  
  14. $mysqli=new mysqli($host,$user,$pass,$dbname);
  15.  
  16. $data="test123";
  17. $stmt=$mysqli->prepare("SELECT * FROM users WHERE user_pwd=?");
  18. $stmt->bind_param("s",$data);
  19. $stmt->execute();
  20. $result=$stmt->get_result();
  21. if($result->num_rows()===0) exit('No rows');
  22. while($row=$result->fetch_assoc()){
  23. echo $row['user_uid']."<br>";
  24. }
  25. $stmt->close();
  26.  
  27.  
  28.  
  29. ?>
  30. </body>
  31. </html>
Add Comment
Please, Sign In to add comment