NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing some form values through to a redirected page...

CHUN-YIU LAM 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.

Matthew

Programming is like Math.  The is always more than one way to skin that cat 
:-P

----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 
page...
Date: Sat,  1 Feb 2003 23:10:09 -0500
Received: from parsec.nyphp.org ([66.250.131.26]) 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 [66.250.131.26])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)
X-Message-Info: dHZMQeBBv44lPE7o4B5bAg==
Message-Id: <200302020410.h124A9kw015060 at parsec.nyphp.org>
X-Paralist-Archived: <http://nyphp.org/list/paralist_archive.php?L_mid=2754>
X-List-Software: Paralist 0.6
List-ID: <nyphptalk.nyphp.org>
List-Owner: <mailto:listmaster at nyphp.org>
List-Archive: <http://nyphp.org/list/paralist_archive.php?L_lid=1>
List-Subscribe: <http://nyphp.org/list/>
List-Unsubscribe: <http://nyphp.org/list/>
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) 
FILETIME=[03AB5330:01C2CA71]

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
 >>
 >>
 >sticks
 >
 >
 >>it on the end of the redirected URL, like the browsers do.  Either way, 
the
 >>redirected script will have to use the GET method, even if the browser
 >>
 >>
 >request
 >
 >
 >>was a POST method.
 >>...
 >>George Webb
 >>
 >>
 >
 >George,
 >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.
 >
 >Jerry
 >
 >
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)
or
2) create two utility functions and use sessioning to transfer data to
the next page (Jerry's idea)

--Stephen



--- Unsubscribe at http://nyphp.org/list/ ---


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the talk mailing list