Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include 'dbh.php';
- $uname=$_POST['uname'];
- $pass=$_POST['pass'];
- $sql="SELECT * FROM signup WHERE username='$uname' AND password='$pass'";
- $result=$conn->query($sql);
- if (!$row=$result->fetch_assoc()){
- header("Location:error.php");
- } else {
- $_SESSION['name']=$_POST['uname'];
- header("Location:home.php");
- }
Add Comment
Please, Sign In to add comment