Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $logged_in = false;
- if(isset($_POST['username']) && isset($_POST['password'])){
- $username = $_POST['username'];
- $password = $_POST['password'];
- if($username === 'Ahmad' && $password === '123'){
- echo "Logged in !";
- $logged_in = true;
- }
- else
- echo "Worng Credentials !";
- }
- if(!$logged_in){
- ?>
- <form action="" method="post">
- <input type="text" name="username" placeholder="Username">
- <input type="password" name="password" placeholder="Password">
- <input type="submit">
- </form>
- <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement