PHP Mail Form

Grandmaster

Electronica Addict
Political User
#1
Hi guys, I'm looking for a PHP Mail Form script for use at my site. I just want it to be really simple and I don't want my email address to be displayed in the code as well, so all the spam bots can't pick it up. Please post any good ones you know of. :)

Thanks
 

SPeedY_B

I may actually be insane.
#5
The one I wrote for camportal :)
PHP:
case ask:
print "<br />Please enter your details
<form action=\"?page=send\" method=\"post\">
<div>
<br /><label for=\"username\">Your name</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"text\" name=\"usersname\" id=\"username\" /><br />
<br /><label for=\"usersurl\">Your Website (enter \"none\" if you don't have one)</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"text\" name=\"usersurl\" id=\"usersurl\" /><br />
<br /><label for=\"camurl\">Your WebCam URI/Image (<b>must be a direct .jpg link!</b>)</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"text\" name=\"camurl\" id=\"camurl\" /><br />
<br /><label for=\"mailfrom\">Your E-Mail adress (for contact use only, won't be displayed)</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"text\" name=\"mailfrom\" id=\"mailfrom\" /><br />
<br /><label for=\"where\">Where did you hear about us?*</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<input type=\"text\" name=\"where\" id=\"where\" /><br />
<br /><label for=\"comment\">Questions / Comments?*</label>
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<textarea name=\"comment\" id=\"comment\" rows=\"5\" cols=\"20\" ></textarea><br /><br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"submit\" value=\"Send\" />
</div>
</form>
<br /><br /><br />
<br /><br /><br />
<i>* optional field</i>";
break;
case send:
$fielderror = "<font color=\"red\">Please fill in ALL fields.</font>";
if ($_POST[mailfrom] == NULL) {print "$fielderror";}
elseif ($_POST[camurl] == NULL) {print "$fielderror";}
elseif ($_POST[usersurl] == NULL) {print "$fielderror";}
elseif ($_POST[usersname] == NULL) {print "$fielderror";}
else {
$_POST[usersname] == stripslashes($_POST[usersname]);
mail("E@MAIL.DOMAIN", "Subject","CAM URL : $_POST[camurl]\nUSER name: $_POST[usersname]\nURL: $_POST[usersurl]\nEMAIL: $_POST[mailfrom]\nWHERE: $_POST[where]\nCOMMENTS: $_POST[comment] \n\n\n\n oki, thx.",
     "From: $_POST[mailfrom]\r\n"
    ."X-Mailer: PHP/" . phpversion());
print "
<script language=\"javascript\" type=\"text/javascript\">
setTimeout(\"window.location.replace('?');\",5000);
</script>
<b>Request Sent!</b>
<br /><br />&nbsp;&nbsp;
<table border=\"0\">
<tr>
<td valign=\"top\" width=\"150\">&nbsp;&nbsp;Submitted Information </td>
<td>
<i>From</i><br /> $_POST[usersname] (<a href=\"mailto:$_POST[mailfrom]\">$_POST[mailfrom]</a>)
<br />
<br /><i>Cam URL</i><br /> <a href=\"$_POST[camurl]\">$_POST[camurl]</a>
<br />
<br /><i>Website URL</i><br /> <a href=\"$_POST[usersurl]\">$_POST[usersurl]</a>
</td></tr></table>
<br />
<br />
<br /><b>Your details have been submitted and will be reviewed.<br /><span style=\"font-size:18px;\">this is NOT an instant process.</span></b>
<br />
<br />
<br />You will be re-directed to the <a href=\"?page=one\">main page</a> in a few seconds.
";
}
break;
 

Members online

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,970
Messages
673,298
Members
89,016
Latest member
Poseeut