Getting data from cookie in PHP scripts
Posted: Sat Aug 24, 2002 4:11 am
Hello
I have a loginscript that checks the username and password from a MySQL table, if you logged in correctly, a cookie will be set.
How do I get the information from the Cookie in a PHP-tag?
Something like this:
Or something like that.
Thank you very much for helping me!
I have a loginscript that checks the username and password from a MySQL table, if you logged in correctly, a cookie will be set.
How do I get the information from the Cookie in a PHP-tag?
Something like this:
Code: Select all
<?php
if ($loggedin == 1) // check cookie info
{
include "$username.php";
} else {
header("Location: login.php");
}
?>Thank you very much for helping me!