Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require('connect.php);
- if(isset($_POST['username'] and isset($_POST['password']))
- {
- $username=$_POST['username'];
- $password=$_POST['password'];
- $query="SELECT * FROM 'user' WHERE username='$username' and password='$password'";
- $result=mysqli=query($conection, $query) or die(mysqli_error($connection));
- $count = mysqli_nm_row($result);
- if ($count ==1)
- {
- $_SESSION['username'] = $username;
- }
- else
- {
- $fmsg="Invalid Login Credentials.";
- }
- }
- if(isset($_SESSION['username']))
- {
- echo "Hello " . $username. "";
- echo " Welome to the Landing Page!";
- session_destroy();
- echo "<a href ="logout.php'> Logout</a>";
- }}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement