I've searched everywhere and tried everything. If you log in on http://r4ge.ro it works. If you go to www.r4ge.ro the cookie is read and works. If you log out, then try to log in on www.r4ge.ro the cookie is never created.
$data = "name=" . $jucatoru . "&pass=" . md5($passw);
$date_of_expiry = time()+60*60*24 ;
setcookie ( $cookie, $data, $date_of_expiry, "/", ".r4ge.ro");
echo "Succesfully logged in";
exit();
I've checked and it's not a reading problem, the cookie doesn't exist if you try to log in from www.r4ge.ro. Tested on chrome and firefox (site doesn't work on IE)
This is how the logout is done
$date_of_expiry = time() - 60 ;
setcookie( $cookie, "nothing", $date_of_expiry, "/", ".r4ge.ro");
echo "Succesfully logged out!
And this is how the cookie is read
$data = $_COOKIE[$cookie];
parse_str($data, $output);
$name = $output['name'];
$pass = $output['pass'];
Test credentials: test : test1 if you want to try it out yourselves