PHP Mail Form


Electronica Addict
Political Access
3 Feb 2002
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. :)

Simple php mail looks like what I need, I'll try it when I get home. Thanks :)
The one I wrote for camportal :)
case ask:
print "<br />Please enter your details
<form action=\"?page=send\" method=\"post\">
<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\" />
<br /><br /><br />
<br /><br /><br />
<i>* optional field</i>";
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\">
<b>Request Sent!</b>
<br /><br />&nbsp;&nbsp;
<table border=\"0\">
<td valign=\"top\" width=\"150\">&nbsp;&nbsp;Submitted Information </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>
<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.
Looks like that script could do with a stripslashes(); in there. :)
Heh, that isn't how I got the email, I just adding the Subject, Message part.

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Latest member