I tried to make a password confirmation, however that line of code is just completely ignored, when you press the button with all fields filled in except confirm (the last one), it redirects to the login (which I never even gave the order to).
if ($user->save())
{
header("Location: index.php");
}
else
{
$error = "Woops";
}
if (empty($userName))
{
$error1 = 'Vul dit veld in!';
}
if (empty($passWord))
{
$error2 = 'Vul dit veld in!';
} else if ($passWord != $confirmPw)
{
$error4 = "Wachtwoorden zijn niet matchend!";
}
if (empty($email)) {
$error3 = 'Vul dit veld in!';
}