Re: Putting $_POST into string to send to ASP

From: Date: Fri, 16 Jul 2004 18:40:25 +0000
Subject: Re: Putting $_POST into string to send to ASP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190739@lists.php.net to get a copy of this message
> How do I gather up all the variables in $_POST and attach them as a > string after the question mark? Thanks. this is untested: $arr = array(); foreach($_POST as $key => $value) { $arr[] = $key.'='.urlencode($value); } $URL = "https://example.com/script.asp?".implode('&',$arr); header("Location: $URL\n");

« previous php.general (#190739) next »