Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "bruker";
- $password = "hei";
- $operation = $_GET['do'];
- $input_username = $_POST['username'];
- $input_password = $_POST['password'];
- if ($operation == login) {
- if ($input_username && $input_password) {
- if ($input_username == $username && $input_password == $password) {
- redirect("../index.html");
- } else { echo "feil brukernavn/passord"; }
- } else { echo "Du må fylle inn både brukernavn og passord"; }
- } else {
- ?>
- <form method="POST" action="index.php?do=login">
- Username: <input type="text" name="username" size="15" /><br />
- Password: <input type="password" name="password" size="15" /><br />
- <div align="center">
- <p><input type="submit" value="Login" /></p>
- </div>
- </form>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement