> You could do that, but for one thing, it doesn't handle 
> arrays. The code snippet in the user notes does.

You are absolutely correct, but I'm not sure that ASP could handle arrays
either.

On the other side Matt M.s processing should work better than mine;

>foreach($_POST as $key => $value) {
>       $arr[] = $key.'='.urlencode($value);
>}

I believe my loop may change the & character to something it shouldn't?


Warren Vail


> -----Original Message-----
> From: Lars Torben Wilson [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 16, 2004 12:55 PM
> To: Vail, Warren
> Cc: 'Lars Torben Wilson'; Jeff Oien; PHP
> Subject: Re: [PHP] Re: Putting $_POST into string to send to ASP
> 
> 
> Vail, Warren wrote:
> 
> > How about (probably one of fifty solutions;
> > 
> > Foreach($_POST as $k => $v) $vals[] = $k."=".$v;
> > $strvals = urlencode(implode("&",$vals));
> > Header("Location: https://example.com/script.asp?".$strvals);
> > 
> > One thing to think about, URL's are limited in length, and 
> one reason 
> > for using method=post is that they won't fit in a URL, for 
> this you'll 
> > need to make sure they fit.
> > 
> > Warren Vail
> 
> You could do that, but for one thing, it doesn't handle 
> arrays. The code snippet in the user notes does.
> 
> 
> 
> -- 
> Torben Wilson <[EMAIL PROTECTED]>
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

Reply via email to