Re: Forwarding $_POST[]...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tony Di Croce wrote:
I keep wanting to do something, and either I dont know how to do it, or I'm
doing something wrong and need to rethink things.

Quite often, I have a form that submits to a php script via POST and after
doing some processing (or more frequently, asking the user a question), I'd
like to forward those $_POST[] vars to another script (or even the same
script).

Sounds like an architectural issue to me. Think about why you want to do this. Can you not just include the other script rather than causing another HTTP request?

I could do something complicated and store the $_POST vars in $_SESSION[],
but what I'd rather do is simply add a var to $_POST[] and resubmit this to
the same .php.

Let me get this straight... you want to add a variable to the $_POST array and then re-run the current script? Put the functionality you need into a function and then use standard control structures (while, if, foreach, etc) to call it over and over again if necessary. There's absolutely no need to cause another HTTP request.

Is their any way to do this, or do I need to rethink things?

Rethink things. There's almost certainly a better way but without knowing why you think you need to do this it's not possible to help any further.

-Stut

--
http://stut.net/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux