two forms and a send code

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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 ...).
Jason C. LevineNo oneCommented:
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.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.