For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > September 2004 > Register Globals = OFF not passing variable









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Register Globals = OFF not passing variable
Craig Hoffman

2004-09-25, 3:58 am

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com