two forms and a send code

Posted on 2006-04-07
Medium Priority
Last Modified: 2010-04-25
if i have in a site two forms can i attach both to the same sending code? lets say i have one form for registration and one for just simle messages.
and if i can attach them to the same asp code or php how can i make it that the right form will be sent?

best regards

Question by:derrida
LVL 10

Expert Comment

ID: 16401651
I'm not sure I understand the question, but you can have 2 seperate pages with html forms and have them post to the same asp page (<form action="destination.asp" method="post">).  You can then use IF...THENs to distinguish the actions from each page (IF request.form("page1field") <> "" THEN ...).
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16402532
Hi derrida,

If you have two forms on a page, only one of them will be processed when you hit its submit button.  The same *code* can be used to process both forms, you just need to write it in such a way that it tests to see which form was submitted and branch appropriately.

Accepted Solution

siva350 earned 375 total points
ID: 16623923
YOu could set a hidden field in each form and use the same send page. Just test for the hidden field with an if statement in each form to validate wich form was submitted.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question