Jump to content

Thanks for the link, can you take a look?


bufhal

Recommended Posts

Thank you for the link. I am getting close, but this is not working.
I want the dropdown menu, when someone hits submit, to send the email (subject and message)to that person chosen in dropdown.
I appreciate your help.


[code]<?php
$emails = array(
  0 => 'et@email.com',
  1 => 'jb@email.com' ,
  2 => 'rpec@email.com' ,
  3 => 'mkt@email.com' ,
 
);
if (!empty($_POST['email_to']) && in_array($_POST['email_to'], $emails)) {

  if (mail(  )) {
      echo 'Email sent';
      exit();
  }
}
?> [/code] <center>
<body bgcolor="#d0d0d0">
<hr><br>
<h2>Please email us...</h2>
<br><br>
[code]<form action="mail2.php" method="POST">
  <p><b>Subject</b><br>
  <input type="text" name="subject" size=50>
  <br><br>
  <select name="email_to">
<option value="1">Ela Teirn -  Dir of Marketing</option>
<option value="2">Jen B -  Asia Sales</option>
<option value="3">Rick P -  Tech Support</option>
<option value="4">General Marketing Inquiry</option>

</select>
<br><br>
<b>Message</b><br>
<textarea cols=40 rows=10 name="message"></textarea>
<input type="submit" value=" Send ">
</form> [/code] </body></center>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.