You are here: Re: posting form data to two php scripts at once « PHP Programming Language « IT news, forums, messages
Re: posting form data to two php scripts at once

Posted by seaside on 12/17/06 03:07

one.1more@gmail.com schrieb:

> How do i post the form data to different php files at once. I tried the
> following code but it doesn't work. the data is sent only to the first
> php file.
>
> <form method="post" action="insert.php" action="mail.php">
> Email<input type="text" name="email" value ="" size="20" />
> <input type="submit" value="submit" />
> </form>

You simply can't submit two forms at once.

I'd propose to use AJAX's XMLHttpRequest. As a starting point, look
here: http://de.wikipedia.org/wiki/XMLHttpRequest

Basically, you need to instantiate two XMLHttpRequest object, and fire
them one after the other. Both XMLHttpRequest get fired asynchronously,
if used using correct settings.

To prepare the XMLHttpRequest, use JavaScript

 

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

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