NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing some form values through to a redirected page...

Webapprentice webapprentice at onemain.com
Sat Feb 1 23:06:02 EST 2003


Hi Jerry,
Thanks.  Between you and George, there is definitely more than one way 
to do it.

Thank you.

--Stephen

Jerry Kapron wrote:

>-----Original Message-----
>From: Webapprentice <webapprentice at onemain.com>
>
>  
>
>>(I have to use $HTTP_POST_VARS[], because _POST[] isn't supported on the
>>server I'm on).
>>
>>I just want to access a $HTTP_POST_VARS[] variable on the second page
>>for use in a hidden form.
>>    
>>
>
>
>I modified the functions to work on your server. Include them in your
>scripts and follow the instructions below.
>
>function post_save() {
>        global $HTTP_POST_VARS;
>        global $HTTP_SESSION_VARS;
>        if(count($HTTP_POST_VARS)) {
>              $HTTP_SESSION_VARS['post_around'] = $HTTP_POST_VARS;
>       }
>}
>
>
>function post_read() {
>        global $HTTP_POST_VARS;
>        global $HTTP_SESSION_VARS;
>       if(!count($HTTP_POST_VARS) &&
>isset($HTTP_SESSION_VARS['post_around']) ) {
>              $HTTP_POST_VARS = $HTTP_SESSION_VARS['post_around'];
>              unset($HTTP_SESSION_VARS['post_around']);
>       }
>}
>
>
>Place this code near the top of each script (after the above function
>definitions):
>
>session_start();
>post_read();
>
>and this right before each header( 'Location: ...') call:
>
>post_save();
>
>That's all. Don't let anyone confuse you and make it seem more complicated
>than it really is :)
>
>Jerry
>
>
>
>
>
>
>
>--- Unsubscribe at http://nyphp.org/list/ ---
>
>
>
>  
>





More information about the talk mailing list