Re: [PHP-DB] Redirect upon successful form submission
[email protected] (Christoph Rosse)
| Newsgroups | php.db |
|---|---|
| Message-ID | <[email protected]> |
you could also validate the form in a seperate php file with no output and then redirect to the "error" and the "another page" ? Bastien Koert schrieb: > On Tue, Dec 15, 2009 at 12:48 PM, Vinay Kannan <[email protected]> wrote: > >> Hi, >> >> I have 2 pages on php, the first page has a small form to accept a >> membership number from the user, which checks for membership number in the >> DB, if the membership no does not exist, gives an error saying 'you are not >> a member click here to become a member now', this bit works fine. >> >> The problem is the following bit 'if the user is a member, i want the user >> to be directed to another page. >> >> this is what i did to get the result since header("Location:....") wont >> work, as already the form has been printed on the page. >> >> echo'<META HTTP-EQUIV="refresh" content="0;URL=member.php">'; but the >> problem is that this takes couple of seconds, till then the page is very >> much visible which doesnt look good. >> >> Any help on this is much appreciated. >> >> Thanks, >> Vinay. >> >> > > What about holding the form in the buffer, and then dealing with the > buffer before sending the form? > > >