(Disclaimer) MY php experience is approx 2 hours old and I have know idea what I am doing.
This is my error and I am wondering how do you know where the error is, for example.
as rendered in my browser, this is my error.
Fatal error: Call to undefined function array_key_exist() in
/home/mjcrawle/public_html/cit/home/processlogin.php on line 47
Line 47 is actually if (array_key_exist('submit', $_post)){
I do not know if the error is before or after - this is my code.
/*Determine if the form data was submitted*/
if (array_key_exist('submit', $_post)){
/*this removes left over data*/
$emailaddress = sanitize($_post['emailaddress']);
$password = sanitize($_POST['password']);
/*verify form data*/
$auth_status = validateLogin($emailaddress, $password);
}
array_key_existssnippet originates in a bad tutorial. Useisset($_POST["submit"])or justif ($_POST["submit"])if you want debug information. Also I have a hunch thesanitize()function might not be a stellar implementation either.array_key_existsbad? The only difference is thatissetreturns false if a variable is set to null.