Hello everyone:
Since YESTERDAY I have a big problem with the cookies, username and password is not recognized in dif sites, it is weird because in other parts they are, I was suspecting that may be the remote server did some changes in directives or something but they say they didn’t. After the page of the LOGIN you enter but then you can’t continue because the user name and password is not stored as cookie. Her is the code:
[php] $User= $_POST[‘username’];
if (isset($_POST[‘username’])){
setcookie(“EDAd”, $User, time()+10800);
setcookie(“PEPEd”, $User, time()+10800);
/* expire in 180 minutes
*/
$Pw = crypt(md5($_POST[‘password’]),md5($_POST[‘password’]));
// echo $Pw;
setcookie(“Passa”, $Pw, time()+10800);
echo ‘User:’,$User;
echo ‘A VER cookie:’,$_COOKIE[“EDAd”] ,‘
Username:’,$_POST[‘username’];
echo ‘Cookie pass:’,$_COOKIE[“Passa”],‘
All:’;print_r($_COOKIE) ;
echo ‘A VER con PEPEcookie:’,$_COOKIE[“PEPEd”] ;
// $colname_Recordset1 = “-1”;
// if (isset($_COOKIE[‘EDAd’]))
// {
// $colname_Recordset1 = $_COOKIE[‘EDAd’];
// }
}
else
{ $User= $_COOKIE[“EDAd”] ;
$Pw =$_COOKIE[“Passa”];
if ($User=="") {echo ‘
Session expired
’;die();}}
[/php]
It has some echo that I included to show the cookies and they don’t appear.
Thanks for any help.
Luis