In article <000c01c21b02$4b69e1b0$1aed0dd1@gateway>,
 [EMAIL PROTECTED] (César aracena) wrote:

>  I have a mainusers.php page, which only calls for functions
> instead of writing them all together inside that page. At one step, it
> calls for an “adduser” function which brings a table that let the
> administrator insert a new user. After the submit button is pressed, it
> calls for a function called “useradded” which resides in the same
> library as the “adduser” function. This useradded function queries the
> database, inserting the user. The problem is that it does not get the
> HTTP POST VARS although they are being passed according to phpinfo.php.

Without an example to look at, I may be mis-understanding your situation.  
But it sounds like this may be a scoping issue: trying to use a global 
($HTTP_POST_VARS) within a function without using the special "global" 
keyword. 

This won't work:

function adduser()
   {
   echo "LOCAL SCOPE: " . $HTTP_POST_VARS['user'];
   }
adduser();

This will:

function adduser()
   {
   global $HTTP_POST_VARS['user'];
   echo "GLOBAL SCOPE: " . $HTTP_POST_VARS['user'];
   }
adduser();

If this is the problem you're having, you can find more information at:

http://php.net/variables.scope
http://php.net/global

-- 
CC

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

Reply via email to