Re: Re: re[PHP] gister_globals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tbt wrote:
Hi

I have two php files as follows

session_register.php // sets the value of $refString
<?php
session_start();
session_register("refString");
$refString = $_GET['refNo'];
?>


$_SESSION['refString'] = $_GET['refNo'];


and

session_data.php // retrieves the value of $refString
<?php
session_start();
echo $refString;
?>

echo $_SESSION['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. Is
there anyway to modify my php files so that it works correctly when
register_globals is set to 'off'. I only need the value of the variable
$refString accessible from all the php files.

I hope you do some other sort of sanitization before using this variable in other places :)

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux