Can anyone help out with this here cookie trouble. I can't seem to get my cookies to get set. I have tried several ways to set the cookie and display the info but everytime I get nothing. Code:
1.
$time = mktime()+600;
$date = date("l, d-M-y H:i:s", ($time));
print ("<META HTTP-EQUIV=\"Set-Cookie\" CONTENT=\"username=$username;expires=$date GMT; path=/\">");
print ("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1;http://www.magform.com/login.php\">");
2.
// header("Set-Cookie: username=$username; expires=$date GMT");
//header("Location: login.php");
AND login.php is:
if (isset($username) && isset($password)) {
echo $username . "<BR>" . $password;
};
if (!isset($username) && !isset($password)) {
<FORM ACTION="setcookie.php" METHOD="POST">
<INPUT TYPE="text" NAME="username">
<INPUT TYPE="text" NAME="password">
<INPUT TYPE="submit" NAME="login">
</FORM>
};