Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id='login' action='loginconfirm.php' method='post'>
- <fieldset >
- <label style="font-family: gothamlight; color: white; font-size: 1em;"
- class="loginform" for='username' >User:</label>
- <input class="loginform" type='text' name='username' maxlength="50" />
- <label style="font-family: gothamlight; color: white; font-size: 1em;"
- class="loginform" for='password' >Passwort:</label>
- <input class="loginform" type='password' name='password' maxlength="50"
- />
- <input type='submit' name='Submit' value='Login' />
- </fieldset>
- </form>
- <?php
- $username = mysqli_real_escape_string($_POST['username']);
- $password = mysqli_real_escape_string($_POST['password']);
- require 'datenbank.php';
- $q = "SELECT * FROM users WHERE username = '$username'";
- $result = $mysqli->query($q) or die(mysqli_error());
- if (mysqli_num_rows($result) == 1) {
- setcookie('authorized', 1, 0);
- header("Location: http://www.google.de");
- }
- else {
- header("Location: admin.php");
- }
- ?>
Add Comment
Please, Sign In to add comment