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

'If Statements' in a form

Options
  • 20-06-2006 12:27pm
    #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 Posts: 16,735 ✭✭✭✭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 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 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 Posts: 16,735 ✭✭✭✭astrofool


    eurgh CGI :)


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


    Very simple to do with PHP


Advertisement