I got this code in php: my purpose of $errors is to display the error when I execute them in php. but sadly it says that $errors is not a defined variable.. how come? anybody could help me please?
if (empty($username) === true || empty($password) === true)
{
$errors[] = 'You need to enter a username and password';
}
else
{
//here
}
print_r ($errors);
}
and I got this error..
Notice: Undefined variable: error in C:\xampp\htdocs\shaven\login.php on line 28
May I know how to solved this?