require_once()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

alexGL
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 16, 2003 12:58 pm

require_once()

Postby alexGL » Thu Jan 16, 2003 1:10 pm

Hi,

I've got a problem. My main.php contains that:
require_once ("module.php");

module.php has the following code inside:
echo "$HTTP_POST_VARS['var']";

and that's not working althrough 'var' variable has been submitted in form that refers to main.php. Is $HTTP_POST_VARS not availabe as a global variable?
the same is for include()

Thanks.
Alex.

serg_dz
New php-forum User
New php-forum User
Posts: 13
Joined: Thu Oct 10, 2002 10:37 pm
Location: Ukraine

Postby serg_dz » Fri Jan 17, 2003 12:47 am

You don't need to do a global $_POST; to access it within functions or methods, as you do with $HTTP_POST_VARS.

alexGL
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 16, 2003 12:58 pm

Postby alexGL » Fri Jan 17, 2003 3:24 am

not sure what's meant by the global $_POST
my problem is the $HTTP_POST_VARS array is not available in module.php althrough it's available in main.php.
I believe I'm missing something... got any ideas?


Return to “PHP coding => General”

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest

cron