Re: POST on redirects?

From: Date: Thu, 03 Aug 2006 18:56:52 +0000
Subject: Re: POST on redirects?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-240076@lists.php.net to get a copy of this message
On Fri, July 28, 2006 3:55 pm, Tony Di Croce wrote: > In a couple of my scripts, I do something like the following when I > detect > an improperly submitted form: > > ** if( !valid_string( $_POST['firstname'] ) ) > { > $return_url = > "https://www.abc.com/checkout_phase1.php?error=FirstName > Required"; > header( "location: $return_url" ); > exit(0); > } > > Recently I changed the code so that a big variable that was being > passed via > GET (IE, as a param in the URL) is instead being POST'd... (typically, > via a > hidden INPUT elem in a form)... > > Unfortunatley, this broke my error handling logic... Is it possible to > add > POST variables to a redirect? How? There are functions "out there" to send POST data from PHP. The canonical example can be found by Googling for "Rasmus Lerdorf posttohost" -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#240076) next »