Unfortunately, the $msg I wanted to pass is very long. If I use the GET method, the URL will look very messy and it may even not work because of the length.
I did figure out I can do the same redirecting function with Execute:
[-
$msg = "WARNING: no action was taken and much more......";
Execute('acc_admin.htm',$msg);
exit;
-]
In this way, the flow is redirected to 'acc_admin.htm' and $msg is passed to the new page. But there is one problem: The URL on the top part of the browser remains that of the calling page, not the redirected page (acc_admin.htm). That looks quite confusing to me. Is there some way to fix the URL displayed to be the redirected page?
Thanks.
.......Hoenie
At 09:18 PM 1/1/2003 +0100, you wrote:
> > I have a beginner's question. > > I'm trying to redirect the program flow to another .htm page using > $http_headers_out{Location} but I also want to pass a message ($msg) to the > new page using POST method. > > [- > $msg = "Error saving data #53: really really long explanation...."; > $http_headers_out{Location}="acc_admin.htm"; > exit; > -] > > What's the best way to do that? >You can't do a POST request as an redirect, but you can do a GET to pass the data [- $r = shift ; $http_headers_out{Location}="acc_admin.htm?msg=" . $r -> Escape ($msg, 2) ; The Escape makes sure you don't get trouble with any special chars inside the url Gerald ------------------------------------------------------------- Gerald Richter ecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925131 WWW: http://www.ecos.de Fax: +49 6133 925152 ------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
