Re: Forwarding $_POST[]...

From: Date: Thu, 09 Aug 2007 18:15:45 +0000
Subject: Re: Forwarding $_POST[]...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-260530@lists.php.net to get a copy of this message
On 8/9/07, Tony Di Croce <dicroce@gmail.com> 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). > > 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. > > Is their any way to do this, or do I need to rethink things? > > td > > -- > Publish technical articles @ skilledwords.com and get 100% of the > ad-revenue! > http://www.skilledwords.com > You can do either one, Tony --- rethink or go ahead with it. Check out the cURL functions if you want to forward the variables as a POST to a different script. Otherwise, if you're just trying to add new values to the $_POST array to be processed further down the script, simply add them. <? $_POST['new_name'] = "new value"; ?> -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Hey, PHP-General list.... 50% off for life on web hosting plans $10/mo. or more at http://www.pilotpig.net/. Use the coupon code phpgeneralaug07 Register domains for about $0.01 more than what it costs me at http://domains.pilotpig.net/.

« previous php.general (#260530) next »