Purely academic class, I do not understand why the cookie is not put, in var_dump $ _COOKIE ['login'] gives out NULL.
<?php class Auth { private $login; private $passwd; public function ath() { $this->login = md5('123'); $this->passwd = md5('123'); setcookie("login", $login, time()+3600*24, '/'); setcookie("pass", $passwd, time()+3600*24,'/'); } } /***********************/ $m1 = new Auth(); $m1 -> ath(); ?>
$loginand$passwdyou do not exist. - Visman