Page 1 of 1

Beginner with form questions

Posted: Fri Jul 10, 2009 2:37 pm
by jswalt
Is it possible to have a form inside another form and have them both use the same submit button? I have a "Contact Us" form that I have been trying to implement a file upload feature into. The "Contact Us" form is just a drag and drop form using Yahoo Sitebuilder. The file upload feature I managed to get working after trying some PHP code I have come across and making some minor modifications to it. The both work fine on their own, but when I try to drop the file upload html code into the Yahoo Sitebuilder form, it doesn't work properly...even with two submit buttons. Am I trying to do something that shouldn't be done...it seems like I am wanting one form that does two different actions at the same time? I can put a link in to go to the file upload feature and just keep it separate from the "Contact Us" form, but prefer to have it all integrated into one. I would appreciate any help in this matter. I can also provide the html code and php file if need be. Thanks.

Re: Beginner with form questions

Posted: Fri Jul 10, 2009 3:00 pm
by jackpf
You can only submit one form at a time.

And you can't have a form within a form.

I don't understand..what's not working?

Re: Beginner with form questions

Posted: Fri Jul 10, 2009 3:41 pm
by jswalt
Thanks for the quick responses. To answer the first question of what's not working, I want to get contact information sent to my email address at the same time any files that are present get uploaded to the Yahoo server. I want this to be transparent to the user so they don't have to go through two steps. Right now, I can only get the contact form to email me the contact information or I can get the files to upload to the Yahoo server...but I can't get both to happen at the same time. If you look at the jpg image that I attached, you will see what I am talking about regarding a "form within a form".

Regarding the second user response, it is both a visual placement issue and user simplicity that is the reason I am trying to integrate the file upload feature into the "contact us" form. I have attached a jpg image of the "look" that I am trying to achieve.

I appreciate the comments and suggestions. I understand how frustrating it can be working with a beginner like myself. Please forgive any "stupid" questions or comments that I might make due to my ignorance with this type of programming. Thanks.

Re: Beginner with form questions

Posted: Fri Jul 10, 2009 3:42 pm
by jackpf
If you want to send data to two seperate servers, you'll have to either have two pages, or submit the data with cURL or sockets or something.

Re: Beginner with form questions

Posted: Sun Oct 24, 2010 6:11 am
by Jamesiv2
Have your form post to a 3rd script which includes one and two:

<?php
include ('script_01.php');
include (script_02.php');
?>