sdf
By: asdf | Date: Apr 27 2009 21:05 | Format: PHP | Expires: never | Size: 541 B | Hits: 857
- <?php
- if ($_SESSION["logged_in"]) {
- echo "you're logged in!";
- } else {
- $user = "username";
- $pass = "pass";
- if ($_POST["submit"]) {
- if ($_POST["username"] == $user && $_POST["password"] == $pass) {
- $_SESSION["logged_in"] = 1;
- echo "huzzah!";
- } else {
- echo "lulz wrong password";
- }
- } else {
- ?>
- <form action="bla.php" method="post">
- <input type="text" name="username" />
- <input type="password" name="password" />
- <input type="submit" name="submit" value="Login" />
- </form>
- <?php
- }
- }
Latest pastes
1 days ago
1 days ago
2 days ago
2 days ago
2 days ago