Re: Register Globals = OFF not passing variable

From: Date: Sat, 25 Sep 2004 02:39:31 +0000
Subject: Re: Register Globals = OFF not passing variable
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-36381@lists.php.net to get a copy of this message
My apologies for not being clear. ;) I am not getting an error message. The script works just fine when Register Globals are turned on in the php.ini file. I am simply trying to understand what I need to change in order to have RG off and still have my code to work. See the area of the code where the functions start function display_private_results($user_id, $area, $username) This seems to be the problem area. These variables are not being passed when registered globals are turned OFF. On Sep 24, 2004, at 8:51 PM, M Saleh EG wrote:
nothing's clear !! What's the error that u get? wat does the function get or return?? is it a variable scope problem? or what... I dont get the picture.. maybe u should paste the error ur getting.. On Fri, 24 Sep 2004 20:12:46 -0500, Craig Hoffman <choffman@eclimb.net> wrote:
Hey Folks, I can use some help here. I am changing some scripts around so they work with (register) globals off. I am trying to pass variables in a function and it does not seem to be passing. The script work fine with globals turned on. I would really like to have them work with RG turned off. Any help would be appreciated. Here is a short example: <?PHP
       function display_private_results($user_id, $area, $username)
               {
                       if ($_POST['postback_private_results'])
               {
                       include "include/db.php";
                       $query = "SELECT routes.*, users.* FROM users, routes WHERE
area='$area' AND username='$username' ";
               and so on...
Much Thanks, Craig -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- M.Saleh.E.G 97150-4779817


« previous php.db (#36381) next »