[nycphp-talk] Passing some form values through to a redirected page...
chun_lam at hotmail.com
Sat Feb 1 23:19:43 EST 2003
Or you can have the first php to generate an XML output. Then have the
second PHP call the first php. Read the XML from the second php. Done.
Programming is like Math. The is always more than one way to skin that cat
----Original Message Follows----
From: Webapprentice <webapprentice at onemain.com>
Reply-To: talk at nyphp.org
To: NYPHP Talk <talk at nyphp.org>
Subject: Re: [nycphp-talk] Passing some form values through to a redirected
Date: Sat, 1 Feb 2003 23:10:09 -0500
Received: from parsec.nyphp.org ([220.127.116.11]) by mc5-f9.law1.hotmail.com
with Microsoft SMTPSVC(5.0.2195.5600); Sat, 1 Feb 2003 20:10:25 -0800
Received: from nyphp.org (parsec.nyphp.org [18.104.22.168])by
parsec.nyphp.org (8.12.6/8.12.6) with ESMTP id h124A9kw015060for
<chun_lam at hotmail.com>; Sat, 1 Feb 2003 23:10:25 -0500 (EST)(envelope-from
null at nyphp.org)
Message-Id: <200302020410.h124A9kw015060 at parsec.nyphp.org>
X-List-Software: Paralist 0.6
List-Owner: <mailto:listmaster at nyphp.org>
Organization: New York PHP
X-Mailer: Paramail 0.5
Return-Path: null at nyphp.org
X-OriginalArrivalTime: 02 Feb 2003 04:10:26.0147 (UTC)
Jerry Kapron wrote:
>>So if you
>>post to /scriptA.php which does nothing except redirect to /scriptB.php,
>>scriptB.php will not actually see the submitted data, unless scriptA.php
>>it on the end of the redirected URL, like the browsers do. Either way,
>>redirected script will have to use the GET method, even if the browser
>>was a POST method.
>That's not really true. Building a query string from POSTed data and
>appending it to the url in the header('Location: ..') call is not the only
>(and in fact ugly) 'solution'. See my previous message for details.
As a matter of preference, I prefer not exposing any data to the URL.
So I can either...
1) require() or include() the second page, so $HTTP_POST_VARS is
visible on the second page (George's idea)
2) create two utility functions and use sessioning to transfer data to
the next page (Jerry's idea)
--- Unsubscribe at http://nyphp.org/list/ ---
The new MSN 8: smart spam protection and 2 months FREE*
More information about the talk