Re: Re: re[PHP] gister_globals
| From: | Chris | Date: | Wed, 16 Jan 2008 07:22:53 +0000 |
| Subject: | Re: Re: re[PHP] gister_globals | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267374@lists.php.net to get a copy of this message | ||
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/