Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- //anzeigen
- $dbc = mysqli_connect(
- "localhost",
- "root",
- "",
- "adressbuch"
- )
- or die("MYSQL: Conncection error \n" .mysqli_connect_error());
- $username = $_POST ["user"];
- $password = $_POST ["pw"];
- $sql = "SELECT `Benutzername` FROM `accounts` WHERE `Benutzername` = '".$username."' AND `Passwort` = '".$password."'";
- $result = mysqli_query($dbc, $sql);
- if(mysqli_num_rows($result) > 0) {
- $_SESSION['session'] = true;
- header("Location: test.php");
- }
- ?>
Add Comment
Please, Sign In to add comment