Jump to content


contact form help

  • Please log in to reply
1 reply to this topic

#1 merebel

  • Members
  • PipPip
  • Member
  • 11 posts

Posted 17 September 2006 - 02:37 AM

Need help setting up a contact form, my biggist problem is I would like a drop down box for differnt contact emails

Example would be to: support or Sales or Admin. for the fields and each one would go to a diifernt email account


#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 September 2006 - 03:35 AM

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:

Email to:
<select name="whoto">
<option value="1">Support</option>
<option value="2">Sales</option>
<option value="3">Admin</option>

Part of the processing script
$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 ...

Legend has it that reading the manual never killed anyone.
My site

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users