$_SEESION works fine, and now doesn't do anything?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
burnmic
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 1:15 pm

$_SEESION works fine, and now doesn't do anything?

Post by burnmic »

Hey everyone,

I've also read that any script that needs to use register variables isn't coded well, so i'm looking into alternatives, however, this won't be for a while i'm sure. The issue that seems to have suddenly cropped up is that $_SESSION seems to have stopped working.. ?

My hosts have told me to try setting register globals to "on", this shouldn't be the case as my phpinfo file already tells me:
"register_globals local value: On master value: On"

I use a form to grab variables, and then use the following code set in a "referral-variables.php" file,

Code: Select all

<?php
session_start();
$_SESSION['partner'] = addslashes($_REQUEST['partner']);
$_SESSION['name'] = addslashes($_REQUEST['name']);"
?>
This file is then used as an include on all pages where the values are required:

Code: Select all

<?php include('../partners/referral-form/referral-variables.php');
session_start();
?>
This was working fine yesterday, but it seems to have just suddenly stopped working, but I can't seem to figure out why this may be - almost 5 hours worth of trial and error and still no joy.

Any help would be appreciated!
thanks a lot
mic

PS: i'm using lunarpages > php version 4.4.9.
Citizen
Forum Contributor
Posts: 300
Joined: Wed Jul 20, 2005 10:23 am

Re: $_SEESION works fine, and now doesn't do anything?

Post by Citizen »

Code: Select all

<?php
session_start();
var_dump(get_defined_vars());
$_SESSION['partner'] = addslashes($_REQUEST['partner']);
$_SESSION['name'] = addslashes($_REQUEST['name']);"
?>
Use that and tell us the output.
burnmic
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 1:15 pm

Re: $_SEESION works fine, and now doesn't do anything?

Post by burnmic »

I've managed to resolve this - thanks anyway :)
Post Reply