dclamp
Jul 1st, 2007, 01:51 PM
I have the following code located at the top of my page:
//Checks if the forum was submited...
if ($_POST['email'] == "" && $_POST['password'] =="") {
//if it was not, check to see if cookies exist...
if (isset($_COOKIE['email']) && isset($_COOKIE['password'])) {
//if so, set in a var and put in a textbox
$mememail = $_COOKIE['email'];
$mempassword = $_COOKIE['password'];
} else {
if their not set, make vars = to nothing
$mememail = "";
$mempassword = "";
}
} else {
//form was submited, set cookies if checked
if ($_POST['remeber']=="checked") {
setcookie("email", $_POST['email']);
setcookie("password", $_POST['password']);
}
}
and it doesnt work. :(. There are no error, it just doesnt call the cookie. I dont think it is set right.
//Checks if the forum was submited...
if ($_POST['email'] == "" && $_POST['password'] =="") {
//if it was not, check to see if cookies exist...
if (isset($_COOKIE['email']) && isset($_COOKIE['password'])) {
//if so, set in a var and put in a textbox
$mememail = $_COOKIE['email'];
$mempassword = $_COOKIE['password'];
} else {
if their not set, make vars = to nothing
$mememail = "";
$mempassword = "";
}
} else {
//form was submited, set cookies if checked
if ($_POST['remeber']=="checked") {
setcookie("email", $_POST['email']);
setcookie("password", $_POST['password']);
}
}
and it doesnt work. :(. There are no error, it just doesnt call the cookie. I dont think it is set right.