Results 1 to 2 of 2

Thread: Form with menu for multiple recipients

  1. #1
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Form with menu for multiple recipients

    Hi there,

    Can anyone lend a hand.... I am trying to put a form together that depending on the value in a drop down box will determine which recipient the form goes to

    For instance the menu could read:
    sales>sales@home.com
    admin>admin@home.com
    tech>tech@home.com

    so depending on which option is chosen will depend on which email address the form goes to??

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't know ASP, so I'll have to speak in generalities here.
    The form goes something like this:
    HTML Code:
    <form action="send.asp" method="post">
    <select name="to">
    <option value="sales@home.com">Sales</option>
    <option value="admin@home.com">Admin</option>
    <option value="tech@home.com">Tech</option>
    </select>
    <input type="submit" value="Send"/>
    </form>
    ... then the content of the POST variable to is the address to send to. You'll want to add some checking that the email is one of the options, too, or someone could use your site to mailbomb innocent people.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •