Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="POST">
- <input type="text" name="username" placeholder="Username">
- <input type="password" name="pass" placeholder="Passwort">
- <input type="password" name="security" placeholder="Securitycode">
- <input type="submit" name="submit" value="Einloggen">
- </form>
- <?php
- if(isset($_POST['submit']))
- {
- if(isset($_POST['username'], $_POST['pass'], $_POST['security']))
- {
- if(!empty($_POST['username']) && !empty($_POST['pass']) && !empty($_POST['security']))
- {
- $hkusername = $conn->real_escape_string($_POST['username']);
- $hkpassword = HoloHashMD5($_POST['pass']);
- $hksecurity = $conn->real_escape_string($_POST['security']);
- $query = $conn->query("SELECT * FROM users WHERE username LIKE '".$hkusername."' AND password LIKE '".$hkpassword."' AND secretcode LIKE '".$hksecurity."'");
- $acpq = $query->fetch_array();
- if($query->num_rows > 0)
- {
- if($name == $acpq['username'])
- {
- $_SESSION['hksession'] = $acpq;
- header("Location: startseite.php");
- }
- else
- {
- $error = "Falsche Logindaten";
- }
- }
- }
- }
- else{
- $error = "Nicht alle Felder ausgefüllt";
- }
- }
- ?>
- <?php
- if(isset($error)){
- echo $error;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement