Re: register_globals
| From: | Maxim Maletsky | Date: | Wed, 29 Jan 2003 14:13:23 +0000 |
| Subject: | Re: register_globals | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133489@lists.php.net to get a copy of this message | ||
three solutions:
1. turn register_globals off for compatibility purposes via .htaccess
file in the script's directory
2. create a auto_prepend file with the following: extract($_GET), this
should do the trick
3. rewrite the whole code to make any user-input (form) variable to be
$_REQUEST or $_GET/$_POST respectively
--
Maxim Maletsky
maxim@php.net
"Kiswa" <Kiswa@telia.com> wrote... :
> I know its stupid but i´ve been writing a site for a register_globals = on
> enviroment
> now i need to convert all the code to an off setting
>
> the page is built by sending a whole lot off vars to diferent pages.
> as you can see below the hyperlink sends the id var to the same page and
> then echos the code.
> can anyone help humpty dumpty?
>
>
>
>
> <font size="2"><a href="left.php?id=1"
> target="_self">Finansiering</a><BR>
> <?
> If($id==1){
> echo "<a href=info/leas.htm target=\"mainFrame\"><font
> color=\"#00CCCC\">Leasing</font></a><BR>
> <a href=info/avb.htm target=\"mainFrame\"><font
> color=\"#00CCCC\">Räntefri
> avbet.</font></a><BR>
> <a href=info/stul.htm target=\"mainFrame\"><font
> color=\"#00CCCC\">Studentlån</font></a><BR>";
> };
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>