connect_error){ die("connection failed".$conn->connect_error); } if(isset($_POST['user'])){ $user=$_POST['user']; $pass =$_POST['pass']; $sql ="select * from login where username = '".$user."' and password='".$pass."' LIMIT 1"; $result = $conn->query($sql); if($result->num_rows>0){ echo("you have successfully loggined"); exit(); }else{ echo("goto previous page"); exit(); } } ?> login form
username:

password:

login.php Open with