Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if (isset($_POST['Submit'])){
- if (isset($_POST['username'],$_POST['password'])) {
- $user = $_POST['username'];
- $pass = $_POST['password'];
- if (($user == 'Giggs') && ($pass == 'password')) {
- $_SESSION['login'] = 'true';
- echo 'Logged in successfully.';
- }
- else { echo 'Fuck off.'; }
- }
- }
- ?>
- <form action="#" method="post">
- Username: <input type="text" name="username"><br /><br />
- Password: <input type="password" name="password"><br /><br />
- <input type="submit" name="Submit" value="Submit">
- </form>
- --------------------------
- <?php
- session_start();
- if ($_SESSION['login'] == 'true') {
- echo 'blahhhhh';
- }
Add Comment
Please, Sign In to add comment