Re: re[PHP] gister_globals
| From: | tbt | Date: | Wed, 16 Jan 2008 07:20:37 +0000 |
| Subject: | Re: re[PHP] gister_globals | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267372@lists.php.net to get a copy of this message | ||
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'];
?>
and
session_data.php // retrieves the value of $refString
<?php
session_start();
echo $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.
Thanks
tbt wrote:
>
> Hi,
>
> I'm a newbie to php and i would like to set register_globals to 'on' from
> my php script itself(eg:- index.php). Is there any way of doing this.
>
> Thanks
>
--
View this message in context: http://www.nabble.com/register_globals-tp14868899p14871630.html
Sent from the PHP - General mailing list archive at Nabble.com.