Make a page called contactform.php
In it... add:
<form onKeyUp="highlight(event)" onClick="highlight(event)" name-"agreeform" onSubmit="return defaultagree(this)" action="sendmail.php" method="post" class="style1">
<p><span class="style2">
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
<strong>Your Name: </strong><br />
<input type="text" name="visitor" size="35" />
</span></p>
<p><span class="style2"><strong>Your Email:</strong><br />
<input type="text" name="visitormail" size="35" />
<br />
<br />
<strong>Subject:</strong><br />
<select name="attn" size="1">
<option value=" Bug Reporting ">Bug Reporting </option>
<option value=" Career Options ">Link us </option>
<option value=" Abuse Report ">Abuse Report </option>
<option value=" Webmaster ">Webmaster </option>
<option value=" Other ">Other </option>
</select>
</span></p>
<p><span class="style2"><span class="style3">NOTE: If you are linking us, please provide your logo URL in the mail message! </span><br />
<br />
<strong>Mail Message:
</strong><br />
<textarea name="notes" rows="4" cols="40"></textarea>
</span></p>
<p>
<textarea name="textarea" cols="40" rows="3" wrap="VIRTUAL">By using this form you agree not to spam or abuse the purpose of this contact form. By submitting you agree that your IP is stored for security reasons and you agree we store your name and email. You agree to submit valid descriptions of your purpose for contacting us.</textarea>
<br />
<span class="style2">
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)">
I agree to the above terms</span><br>
<input type="submit" value="Send Mail" disabled>
<input type="reset" name="Reset" value="Reset">
</p>
</form>Then make a sendmail.php page and add:
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "- Invalid email. Enter a @domain email.\n";
$badinput = "Form was not submited.\n";
echo $badinput;
die ("Please go back and try again. ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<b>Error:</b> Not all feilds where filled.\n";
die ("Please go back and correct this error.");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("
[email protected]", $subject, $message, $from);
?>
<p align="left">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />
Subject: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php>
****, hold on, the sendmail.php code is ******. Anybody correct it please?
Yeah the sendmail.php is broken, does anyone know how to fix it?