You are here: Re: processing 2 things in one form. is it possible? « All PHP « IT news, forums, messages
Re: processing 2 things in one form. is it possible?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация