Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //include init.php
- include ("session.php");
- //Gather details submitted from the $_POST arrayand store in local vars
- $username=$_POST["txtUser"];
- $password=$_POST["txtPass"];
- $sublogin=$_POST["subLogin"];
- //build query to SELECT records fro the users table WHERE the username AND password in the table are equal to those entered
- $sql="Select * from userbook Where UserName = '$username' and Password='$password'";
- //run query and store result
- $result=$conn->query($sql);
- //check result and generate message with code below
- if ($row = mysqli_fetch_assoc($result))
- {
- echo "you are recognised";
- }
- else
- {
- echo "you are not recognised";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement