Your best bet is to modify a form that you've found to work and are happy with already.
As a rough guide:
Code HTML:
<form>
<label for="subject">Subject: </label>
<select name="subject" id="subject">
<option value="0">General Enquiry</option>
<option value="1">Technical Support</option>
<option value="2">Partner with us</option>
</select>
</form>
When processing the form change the recipient email based on the subject area selected:
PHP Code:
// $_POST['subject'] is 0,1,2 depending on what user selected
// line up with appropriate email address using the array key
$email[0] = 'general@example.com';
$email[1] = 'technical@example.com';
$email[2] = 'partnerships@example.com';
//Get preferred address
if(isset($email[$_POST['subject']])) {
$email = $email[$_POST['subject']];
}
else $email = $email[0]; //if no match, fall-back to general
// $email is the one to use
Make sense?
Bookmarks