werty37 Posted May 31, 2006 Share Posted May 31, 2006 HiThis script always throws the message "Cookies are disabled".[code]<?php ob_start('ob_gzhandler');if (!isset($_COOKIE['RESULTS'])) {session_name('RESULTS);session_set_cookie_params(3600, "/results", "", 0); session_start(); ob_flush();if (!isset($_COOKIE['RESULTS'])) {echo "Cookies are disabled";}}else {echo $COOKIE['RESULTS'];}?>[/code]Thanks Quote Link to comment https://forums.phpfreaks.com/topic/10846-plz-debug-this/ Share on other sites More sharing options...
KrisNz Posted May 31, 2006 Share Posted May 31, 2006 You aren't actually setting any cookies. add [code]setcookie("RESULTS") = 'whatever';[/code] and you'll be sorted. Quote Link to comment https://forums.phpfreaks.com/topic/10846-plz-debug-this/#findComment-40518 Share on other sites More sharing options...
werty37 Posted May 31, 2006 Author Share Posted May 31, 2006 HI Actually, I am modifying the php sessin id name.I ve changed the name from PHPSESSID to RESULTSSo the cookie RESULTS would contain the session id generated by php. I dont wanna change the value of thecookie. Moreover When i check the cookie RESULTS,it contains the the session_id. So it is already set, rightThanks Quote Link to comment https://forums.phpfreaks.com/topic/10846-plz-debug-this/#findComment-40521 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.