merebel Posted September 17, 2006 Share Posted September 17, 2006 Need help setting up a contact form, my biggist problem is I would like a drop down box for differnt contact emailsExample would be to: support or Sales or Admin. for the fields and each one would go to a diifernt email accountThanksKeith Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 17, 2006 Share Posted September 17, 2006 Use the dropdown value to reference an array of email addresses in the php script. The html form will not display the email addresses.Part of the html script is a simple dropdown:[code]Email to:<select name="whoto"><option value="1">Support</option><option value="2">Sales</option><option value="3">Admin</option></select>[/code]Part of the processing script[code]<?php$whoto = $_POST['whoto'];$mails = array("", "support@there.com", "sales@here.com", "admin@nowhere.com");$mailto = $mails[$whoto]; // send the mail to... rest of the contact form processing ...?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.