Jump to content

plz debug this


werty37

Recommended Posts

Hi
This 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

Link to comment
https://forums.phpfreaks.com/topic/10846-plz-debug-this/
Share on other sites

HI

Actually, I am modifying the php sessin id name.
I ve changed the name from PHPSESSID to RESULTS
So the cookie RESULTS would contain the session id
generated by php. I dont wanna change the value of the
cookie. Moreover When i check the cookie RESULTS,
it contains the the session_id. So it is already set, right

Thanks
Link to comment
https://forums.phpfreaks.com/topic/10846-plz-debug-this/#findComment-40521
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.