PHP cookies are not working on live server
I'm having a hard time with PHP cookies. I have tested my code on the local server and it seems to be working as expected but when I'm testing my code on the live server, everything is working fine but cookies. I tried everything( including StackOverflow) but it seems not to be working. //these two lines are not executing at all on live server setcookie("_login",$_COOKIE['_login'] = $_POST['email'], time()+2595600, "/"); setcookie("_password",$_COOKIE['_password'] = $_POST['password'], time()+2595600, "/"); if(!empty($_POST['rem'])) //if the button is checked { setcookie("member_login",$_POST['email'],time()+2595600); setcookie("member_password",$_POST['password'],time()+2595600); } What am I doing wrong? Any suggestion would be highly appreciated.