Re: GET and POST problem with included php file

From: Date: Mon, 15 Nov 2004 19:17:25 +0000
Subject: Re: GET and POST problem with included php file
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15534@lists.php.net to get a copy of this message
Alexey Borzov wrote: > Hi, > > Patrick Fehr wrote: >> I found out, that if I got an include 'somesite.php'; in my index.php and >> a form there, the submitted date(whether GET or POST) are sent to >> index.php? >> instead of index.php?section=somesite as it was intended to be. >> But I see the problem: HTML/Quickform works with PHP_SELF and that is >> only index.php? (where the data gets sent to). >> Well this could probably be solved with >> header( "Location: somesite.php" ); >> But if working with GET variables in the form, it gets confused at the >> first moment: Because there is already a GET Variable >> set(section=somesite) and the form thinks, that with that the data of the >> form has already been sent and gives back, that required fields are still >> not filled :) The funny thing about that is obviously, that it is not >> possible to have already filled any field, because we just got to that >> page via index.php?section=somesite. >> >> I don't want to call that a bug but I really wonder, why no one else has >> had stated that problem before.. I googled quite a while just to find >> out, that no one has... >> Does anyone has a good solution for that problem with the GET variable? > > RTFFAQ: > >http://pear.php.net/manual/en/package.html.html-quickform.intro-faq.php#AEN41227 You're right, but this is only half the bill, I still can't process the GET or POST Variables to index.php?section=somesite&stuff it always redirects to index.php?stuff And to be honest, pear documentation is hardly readable. The only helpful things are the FAQ I will now try it with the subclass HTML_QuickForm_Page, it seems to have Action methodes for that purpose. If anyone else wants to drop a RTFxy, feel free ;) greets Patrick -- Patrick Fehr Swiss Federal Institute Of Technology

« previous php.pear.general (#15534) next »