ajax login cookie sorunu
Merhaba ajax login yaparken cookie tutturmaya calısıyorum
setcookie("user_id", encrypt($user_login["user_id"]), time()+3600*3600);
ajax ile eger success verirse
if($user_login["user_status"] == 1){
setcookie("user_id", encrypt($user_login["user_id"]), time()+3600*3600);
echo 'go';
}else{
echo 'status-error';
}
kodlar bu sekilde set cookie verip go ile index.php ye gönderiyorum
fakat sistem cookie çalışmıyor
Cookie ile user_id tutman çok tutarsız. Session'a atıp oradan okusan daha mantıklı.
Cookie konusunda ısrarcısan manuel bir cookie tanımlayıp erişebiliyor musun kontrol et ve genelde cookieler tanımlandığı an okunamayabiliyor