Jump to content

contact form help


merebel

Recommended Posts

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("", "[email protected]", "[email protected]", "[email protected]");
$mailto = $mails[$whoto]; // send the mail to

... rest of the contact form processing ...
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/21034-contact-form-help/#findComment-93381
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.