Hope someone can help me with this issue...
I added functionality to save a cookie to a user's computer so the site can recognize the user's computer before he or she logs in. Then a second program retrieves the cookie when the user types in a 4-digit PIN, verifies the cookie in relation with the PIN and allows the user to enter. If there is a problem, such as the cookie is not there, then the appropriate message should display.
The problem...
When there is no cookie installed on the user's computer, the application just takes him or her back to the login page but does not display the message. I am at a loss, as I display messages elsewhere with no problem. Perhaps you can help?
Here's the specs....
There are two pages:
* nda.php /* performs the action of the form */
* private_access.php /* contains the form */
The pertinent code on nda.php...
<?php
include("private_access.php");
$_COOKIE[name];
if(isset($_COOKIE[name]))
{
$name = $_COOKIE[name];
}
else
{
$message = "<font color ='red'>Can't find the cookie. Hmm...</font><p><br>";
include("private_access.php");
exit();
}
/* next functionality should follow here if the cookie is found */
?>
The pertinent code on private_access.php...
<?php
if (isset($message))
echo "<b>$message <p> </b>";
?>
So what did I miss or screw up?
Thanks,
nixwave