v2.5.2
Giriş yap

ajax login cookie sorunu

zehrabilkin
498 defa görüntülendi

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

devepdogukan
1036 gün önce

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