Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- $email = $_POST["Email"];
- $username = $_POST["Voornaam"];
- $lastname = $_POST["Achternaam"];
- $gender = $_POST["Geslacht"];
- $mobile = $_POST["Mobiel"];
- $streetname = $_POST["Straatnaam"];
- $zip = $_POST["Postcode"];
- $city = $_POST["Woonplaats"];
- if($gender == "Man"){
- $gender = 0;
- } else {
- $gender = 1;
- }
- $stmnt = $conn->prepare("
- INSERT INTO 'users' ('id', 'email', 'username', 'lastname', 'gender', 'mobile', 'streetname', 'zip', 'city')
- VALUES (NULL, '" . $email . "', '" . $username . "', '" . $lastname . "', '" . $gender . "', '" . $mobile . "', '" . $streetname . "', '" . $zip . "', '" . $city . "');
- ");
- $stmnt->execute();
- header('Location: /scs/dashboard.php');
- die();
- }
- Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''users' ('id', 'email', 'firstname', 'lastname', 'gender', 'mobile', 'streetn' at line 1 in C:xampphtdocsscsfunctions.php:39 Stack trace: #0 C:xampphtdocsscsfunctions.php(39): PDOStatement->execute() #1 {main} thrown in C:xampphtdocsscsfunctions.php on line 39
Add Comment
Please, Sign In to add comment