You are here: Re: Is it possible to submit two forms at a time « PHP Programming Language « IT news, forums, messages
Re: Is it possible to submit two forms at a time

Posted by Erwin Moller on 02/21/07 09:57

mosesdinakaran@gmail.com wrote:

> Hi All,
>
> I need a small clarification in submitting the forms, Ur
> suggestions please.
>
> In a page I have two form and also two submit butons.
>
>
> (ie)
>
> <form name="myform" action="test.php" method="post" >
> <input type="text" name="myform_name" >
> <input type="text" name="myform_id" >
> <input type="text" name="myform_no" >
> <input type="submit" value="Submit" />
> </form>
>
> <form name="myform1" action="test.php" >
> <input type="text" name="myform1_name" >
> <input type="text" name="myform1_id" >
> <input type="text" name="myform1_no" >
> <input type="submit" value="Submit" />
> </form>
>
> Now is it possible to submit all the elements from the two form when I
> click any one of the submit button.
>
>
>
> Thanks & Regards
> Moses

Hi,

Yes, but not with PHP.
PHP has NO KNOWLEDGE what is going on in the browser. It only sends the
html/javascript/images/whatever the browser displays.

So try Javascript, that language lives in a browser.
Note however that some people choose to have Javascript disabled in their
browser.

If you go Javascript, just add a bunch of hidden fields in both forms, and
fill them before submitting with the values from the other form.
If you need more help: comp.lang.javascript, an active group.

Regards,
Erwin Moller

 

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

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