Sending POST variables from 2 forms in the same time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biancamm
Forum Newbie
Posts: 1
Joined: Thu Oct 25, 2007 10:33 am

Sending POST variables from 2 forms in the same time

Post by biancamm »

Hello,

Please help me on this one!

I have a HTML (TPL) where there are 2 forms. When I click on a button I want to send to a php file input elements from both of the forms.

Do you have an idea how can I do this without copying the inputs from a form to the other?

Thank you!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

You can only submit one form at a time, but perhaps you could do some tricky business using cURL
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Sounds like a poor design. Why would you ever need to submit two forms at the same time? Perhaps you could explain your situation and a more elegant solution could be hypothesized.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Another one who thinks this a bad basic design. It is possibly to possibly to get it working with javascript (on submit) to also include the second form but anything that is dependant on javascript should be avoided in my opinion.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

What they said.
Post Reply