hi

The enclosed will read all incoming variables and convert them, effectively
turning on 'register_globals'

It is a quick fix for broken scripts but does remove the security provided
by turning register_globals off !

use it as an include at the beginning of scripts.

Peter

<?php
#////////////////////////////////////////////////////////////
#                                                           #
#    SunMaia.net RED                                        #
#       e-development at the speed of thought               #
#                                                           #
#                                                           #
#    This module copyright SunMaia.net 1999-2002            #
#     author Peter Lovatt [EMAIL PROTECTED]                   #
#                                                           #
#    http://www.sunmaia.net for full licence terms          #
#    support    http://www.sunmaia.net/support/             #
#                                                           #
#   You can do whatever you like with this so long          #
#   as this header remains in place                         #
#                                                           #
#   It worked last time I used it, but it is not            #
#   guaranteed in any way!                                  #
#                                                           #
#                                                           #
/////////////////////////////////////////////////////////////

    while(list($key, $val) = each($HTTP_POST_VARS))
    {
        $$key = stripslashes($val);
    }


    while(list($key, $val) = each($HTTP_GET_VARS))
    {
        $$key = stripslashes($val);
    }


    while(list($key, $val) = each($HTTP_COOKIE_VARS))
    {
        $$key = stripslashes($val);
    }



?>



-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
-----------------------------------------------

> -----Original Message-----
> From: Allens [mailto:[EMAIL PROTECTED]]
> Sent: 07 July 2002 16:53
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Newbie Reminder on HTML Variable Passing
>
>
> I just recently got back to work on my db's and found that html variable
> passing isn't working anymore. I did some research and fould that the
> core setting in PHP for register_globals is off by default now since
> 4.1.x. As a newbie, this stumped me. There are some new variables
> created by the PHP team to address this, but we need to change our code
> some. The url below helps explain some of this. Hope this helps some of
> the other newbies entering this environment that have been confused by
> this as I had been. :)
>
> http://www.php.net/release_4_1_0.php
> :)
>    Gale L. Allen Jr
>    Macintosh Support Specialist
> 865/947-5740
>
>    "Remember, Love wins over all"
> (:
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to