function checkSessionToken($token) {
if (!isset($_SESSION['token']) || empty($_SESSION['token'])) {
return false;
}
return $token == $_SESSION['token'];
}
For some reason this function is not returning any value, while it really should, causing my script to fail. When I put the result in a variable and echo it, I don’t get any output. Why is this?
Thank you
The code looks good.
Don’t
echothe value. Usevar_dump.echo false;does not output anything (example).var_dumpwill outputbool(false).