Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2. session_start();
  3. // links the database connection to the Login.php file
  4. include 'dbh.php';
  5.  
  6. // get values pass from form in index.php file
  7. $username = $_POST['user'];
  8. $password = $_POST['pass'];
  9.  
  10. // query the database for login
  11. $sql = "INSERT INTO login (username , password) VALUES ('$username','$password')";
  12.  
  13. $result = mysqli_query($conn, $sql);
  14.  
  15. header("Location: index.php")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement