|
Posted by Johnny on 10/04/06 15:38
"pittendrigh" <Sandy.Pittendrigh@gmail.com> wrote in message
news:1159971142.114178.260610@m73g2000cwd.googlegroups.com...
>
> crescent...@yahoo.com wrote:
>
> > Upon clicking submit, I want the form to return to "itself" (does the
> > input fields validation). If the validation is false, the initial input
> > values are displayed on the fields. If the validation is correct, it
> > should go to an external file (on different server) and does the rest
> > of the processing such as sending mail or writing to a file, etc (could
> > be anything).
>
> if($_SERVER['REQUEST_METHOD'] == 'GET')
> {
> ...show the form
> }
> elseif post
> {
> validate the post vars
> if success
> use the header() function to jump the external page
> else
> show the form again, you'll still have
> the $_POST array hanging around to initialize
> the form elements with, so the form looks
> like it did just before the first submit
> }
>
The only problem I see with that is that the OP probably wants to take data
along to the new script(on different server) and header won't do that by
itself afaik. You may need to use curl to repost your data to the other
server.
Navigation:
[Reply to this message]
|