two forms and a send code

Posted on 2006-04-07
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

    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
    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.
    LVL 3

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Mobile App Development with PhoneGap

    PhoneGap can help you leverage your already existing HTML5, JavaScript, and CSS skills in order to create and deploy cross-platform mobile apps.This program comprehensively covers HTML5 mobile app development from top to bottom.

    Suggested Solutions

    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…
    Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now