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 pittendrigh on 10/04/06 14:12

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
}

 

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

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