Guest User

Untitled

a guest
Aug 22nd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2. $servername = "localhost";
  3. $user = "root";
  4. $password = "";
  5.  
  6. $conn = new mysqli($servername, $user, $password);
  7.  
  8. SELECT * FROM $servername;
  9.  
  10. if ($conn->connect_error) {
  11. die("Connection failed: " . $conn->connect_error);
  12.  
  13. }
  14. echo "Connected successfully";
  15. if ($inputuser == $serveruser)
  16. if($inputpass == $serverpass) {
  17.  
  18. header('Location: home.php');
  19.  
  20. } else {
  21. echo "Failure to connect";
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment