I am trying to obtain the data inputted from the form and add it to the database. I get this error
Here is my method to insert the data:
protected function setUser($username, $firstname, $lastname, $email, $password)
{
$sql = 'INSERT INTO userslogin (username, fistname,lastname ,email,password) VALUES (?,?,?,?,?);';
$stmt = $this->connect()->prepare($sql);
$hashedPwd = password_hash($password, PASSWORD_DEFAULT);
if(!$stmt->execute(array($username,$firstname, $lastname , $email , $hashedPwd))){
$stmt = null;
header("location:index.php?error= no execution");
exit();
}