can't reach header.php???
if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = $_POST["firstname"]; $lastname = $_POST["lastname"]; $email = $_POST["email"]; $password = $_POST["password"]; $mobile = $_POST["mobile"]; $office_num = $_POST["office"];
$sql = mysqli_query($dbcon,"insert into `user_info`(`firstname`, `lastname`, `email`, `password`, `mobile`,`office_contact`) values('$name','$lastname','$email', '$password', '$mobile', $office_num)");
if (mysqli_query($dbcon, $sql)) {
echo "New record created successfully";
header("Location: header.php");
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($dbcon); } ?>
This is the error I am receiving:
Error: 1 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 '1' at line 1