newbie question: passing variable values between PHP scripts viaPOST

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm stumped by the following seemingly simple problem.  I've tried
reading online PHP docs but have so far been unable to discern the solution.

I have a PHP form 'foo1.php' that calls a second form 'foo2.php' via a
POST operation.  I want the value of a variable $n in the first script
to be visible to the second script.  What is the correct way to do this?
  Do I need to pass the value of $n as a hidden form variable?  Or can I
simply use a call to GET_HTTP_VARS, _REQUEST, or _POST inside foo2.php
to access the variable?  So far my experiments with the above methods
have failed, but maybe I'm not doing it right.


Re: newbie question: passing variable values between PHP scriptsvia POST

Grant wrote:

Quoted text here. Click to load it

I meant of course HTTP_POST_VARS ....

Site Timeline