Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

'If Statements' in a form

  • 20-06-2006 11:27am
    #1
    Closed Accounts Posts: 78 ✭✭


    Hi,

    I am hoping someone can help me.
    I am placing a form in a html file that will email the results to an email address.

    As part of the form, there is a drop down box where they select 1 of 4 options.

    I was wondering is it possible to have it send the email to different inboxes depending on what they choose. Example - if they choose option 1, them the form results are emailed to email1@whatever.com, if they choose option 2, the results go to email2@whatever.com etc.

    Any advice is most welcome.


Comments

  • Registered Users, Registered Users 2 Posts: 17,165 ✭✭✭✭astrofool


    I'm sure it could be done with a bit of jscript. (tho i'm not sure exactly what jscript, as it's been 2 years since I touched it :))


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    What you're looking for is a CGI form handler. Google is your friend here. Loads and loads of stuff out there on this. I don't think you can embed the logic in the html. I'll move this to the programming forum though. You'll get a better answer there.


  • Closed Accounts Posts: 80 ✭✭Torak


    <SELECT NAME="emailaddress">
    <OPTION VALUE="email1@whatever.com">Mail To Support</OPTION>
    <OPTION VALUE="email2@whatever.com">Mail To Sales</OPTION>
    </SELECT>


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    what language are you using? if it's php then you use the <option> tags posted above and decalre

    $emailaddress = 'emailaddress';

    and carry on with some php mailto code.


  • Registered Users, Registered Users 2 Posts: 17,165 ✭✭✭✭astrofool


    eurgh CGI :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Very simple to do with PHP


Advertisement