RE: [PEAR] Quickform: no serverside validation when *not* submitting form to self url
| From: | Mike Carter | Date: | Tue, 06 Apr 2004 13:02:41 +0000 |
| Subject: | RE: [PEAR] Quickform: no serverside validation when *not* submitting form to self url | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11662@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: mystuff@reva.co.uk [mailto:mystuff@reva.co.uk]
>
> Hello All.
>
> I'm new to PEAR, having seen an article on QuickForm in Linux
> magazine I
> thought I'd give it a whirl.
>
> Everything works fine except the server side validation, I'm
> sure this is
> due to my form data not submitting to itself but going to a
> file called
> process.php
>
> Note:I have no quickform code in my process.php page, only
> PEAR DB stuff
>
> Is this a recognised problem?
Your QF processing should happen in the same file that defines the form and
rules. The QF needs to submit back to itself, build the form again but
instead of displaying it, its used to validate itself.
If everything is validated okay you then do a header() refresh to move to
the next page, to show a success message for example.
Use the Quickform Controller package to make the whole process nicer.
Regards,
Mike C.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________