clown[NOR] Posted April 7, 2007 Share Posted April 7, 2007 Hi again =) well now I've tried out the $_SESSION instead of $_COOKIE for remembering name and URL in my shoutbox... it works perfectly fine on my computer, but I tried it on my fiance's computer and it didn't work.. I added the print_r($_SESSION) to the top of my index file. on my computer it show's all the sessions as they should be, but on my fiance's comptuer it only show's Array() <?php if (isset($_SESSION['sbname'])) { if ($_SESSION['sbname'] != $_REQUEST['sbname']) { $_SESSION['sbname'] = $_REQUEST['sbname']; } if ($_SESSION['sburl'] != $_REQUEST['sburl']) { $_SESSION['sburl'] = $_REQUEST['sburl']; } } else { $_SESSION['sbname'] = $_REQUEST['sbname']; if (isset($_REQUEST['sburl'])) { $_SESSION['sburl'] = $_REQUEST['sburl']; } } ?> Link to comment https://forums.phpfreaks.com/topic/46046-solved-_session-only-work-on-my-computer/ Share on other sites More sharing options...
onlyican Posted April 7, 2007 Share Posted April 7, 2007 Do you have session_start() at the TOP of the document Line 1 Before any htm code Before <html> I have helped soo many people with this problem, and it has been the fact thet forgot session_start() Link to comment https://forums.phpfreaks.com/topic/46046-solved-_session-only-work-on-my-computer/#findComment-223708 Share on other sites More sharing options...
clown[NOR] Posted April 7, 2007 Author Share Posted April 7, 2007 yes... index.php <?php session_start(); if (isset($_SESSION['sbname'])) { $sbname = $_SESSION['sbname']; } if (isset($_SESSION['sburl'])) { $sburl = $_SESSION['sburl']; } ?> shout.php <?php session_start(); $phps_sbname = $_REQUEST['sbname']; $phps_sburl = $_REQUEST['sburl']; $phps_sbmessage = $_REQUEST['sbmsg']; if (isset($_SESSION['sbname'])) { if ($_SESSION['sbname'] != $_REQUEST['sbname']) { $_SESSION['sbname'] = $_REQUEST['sbname']; } if ($_SESSION['sburl'] != $_REQUEST['sburl']) { $_SESSION['sburl'] = $_REQUEST['sburl']; } } else { $_SESSION['sbname'] = $_REQUEST['sbname']; if (isset($_REQUEST['sburl'])) { $_SESSION['sburl'] = $_REQUEST['sburl']; } } ?> at the top of my site it show: Array ( [login] => ok [user] => ******** [sbname] => Clown [sburl] => http://www.phpschool.co.nr/ ) but at my fiance's it show: Array ( ) Link to comment https://forums.phpfreaks.com/topic/46046-solved-_session-only-work-on-my-computer/#findComment-223710 Share on other sites More sharing options...
clown[NOR] Posted April 7, 2007 Author Share Posted April 7, 2007 looks like it's working now =) Link to comment https://forums.phpfreaks.com/topic/46046-solved-_session-only-work-on-my-computer/#findComment-223716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.