<?php include("../controllers/connectdb.php"); $first_name = $_POST["first_name"]; $last_name = $_POST["last_name"]; $age = $_POST["age"]; $dni = $_POST["dni"]; $email = $_POST["email"]; $password = $_POST["password"]; $sql = "INSERT INTO usuario(first_name,last_name1,age,dni,email,password) VALUES(?,?,?,?,?,?); $stmt = mysqli_prepare($conn,$sql);
You’re missing a closing
" on the penultimate line.
thanx so much!
You’re welcome. Sometimes it just takes another pair of eyes.
and/or a good syntax highlighter…
(If you look at the code in the code block above, you can see that all of your variable declarations are blue…except that last one… should be a signal that something’s gone wrong just before that point.)
thanx for your time!
If there was a way to award bonus points I would certainly give them for the correct usage of
Now that that is solved…
NEVER EVER USE PLAIN TEXT PASSWORDS
Do not create variables for nothing. You already have the POST variables, just use them.
You should also validate the user supplied data before inserting into your DB.
I would highly recommend you use PDO.
If there is only one post that follows this one, this will be the