0

I have gone through many questions already but couldn't get the solution. I have avoided id column from my query,which is auto incremented. However I am still getting the above error. My code is as below:

$sql = "INSERT INTO userdata (email,dob,password,verify,token) VALUES (?, ?, ?, ?, ?)";
        $stmt = $conn->prepare($sql);
        $stmt -> bind_param('sssbs',$receivedEmail,$receivedDob,$receivedPwd,$verified,$token);
        if($stmt->execute()){
            //login user
        }else{
        $errors['db_error'] = "Database error: faild to register" .htmlspecialchars($stmt->error);
        }

Can someone help me to figure out this problem? Thank You

Dharman
  • 30,962
  • 25
  • 85
  • 135

0 Answers0