Re: GET and POST problem with included php file
| From: | Alexey Borzov | Date: | Mon, 15 Nov 2004 16:35:23 +0000 |
| Subject: | Re: GET and POST problem with included php file | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15516@lists.php.net to get a copy of this message | ||
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