Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

require_once()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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.
alexGL
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu Jan 16, 2003 12:58 pm

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.
serg_dz
New php-forum User
New php-forum User
 
Posts: 13
Joined: Thu Oct 10, 2002 10:37 pm
Location: Ukraine

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?
alexGL
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu Jan 16, 2003 12:58 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.