Stop using session_register, and start using:
$_SESSION['refString'] = $_GET['refNo'];
And, actually, you should do something more like this:
$refNo = (int) $_GET['refNo']; //sanitize input
$_SESSION['refString'] = $refNo;
The MORE specific you can be about what is a VALID $refNo, in place of
t
tbt wrote:
Hi
I have two php files as follows
session_register.php // sets the value of $refString
$_SESSION['refString'] = $_GET['refNo'];
and
session_data.php // retrieves the value of $refString
echo $_SESSION['refString'];
This code works fine when register_globals is set to 'o
Hi
I have two php files as follows
session_register.php // sets the value of $refString
and
session_data.php // retrieves the value of $refString
This code works fine when register_globals is set to 'on'. But the hosting
site has set it to 'off' and I have no way of adding a .htaccess file.
3 matches
Mail list logo