my code is way off but I am still learning...
<form action="email.php">
<input type="submit name="email">
send you to the page with the dropdown menu..
<html>
<head></head>
<body>
<br />
To:
<select>
<option value="email">man@hotmail.com</option>
<option value="email2">dumb@rogers.com</option>
<option value="email3">junk@mts,net</option>
<option value="email4">test@mts.net</option>
</select>
<br />
from:<input type="text" name="email"> <br />
Subject:<textarea> </textarea> <br />
<input type="submit">
</body>
</html>
is the page with the dropdown menu
and this is the php code...
Code: Select all
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "emailaddress@here.com<script type="text/javascript">
/* <![CDATA[ */
(function(){try{var s,a,i,j,r,c,l=document.getElementById("__cf_email__");a=l.className;if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
/* ]]> */
</script>";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>I'm sorry if I did not quote this properly...
I am having a really hard time trying to create the coding for this.