Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "id8831321_admin";
- $password = "Welkom01";
- $dbname = "id8831321_port";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- if($_SERVER["REQUEST_METHOD"] == "POST") {
- // username and password sent from form
- $uid = mysqli_real_escape_string($conn,$_POST['uname']);
- $pwd = mysqli_real_escape_string($conn,$_POST['psw']);
- }
- $sql = "SELECT * FROM gebruikers WHERE email='$uid' AND wachtwoord='$pwd'";
- $result = mysqli_query($conn, $sql);
- if ($row = mysqli_fetch_assoc($result)) {
- header("Location: index2.html");
- } else {
- echo "Your username or password is incorrect!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement