FUTURESCRIPT-EMAIL ( A DIRECT EMAIL FORM)
+ Copyright 2006 pointblank futurescript-email.
+ Store the html page the contact1.php in the same folder/directory
+ Remember to change "
http://www.domain.com, Admin, Admin Contact,
admin@domain.com" in the contact1.php
Try this -->
<!----- THE PHP FORM NAMED contact1.php -----!>
<?
$error = "There are some fields not filled in, Please go back";
if($nickname == "" || $message == "" || $email == ""){
echo $error;
}
elseif($ip == ""){
echo "Sorry, an unknow error has occured";
}
else{
$yourwebsite ="
http://www.domain.com";
$recipientname ="Admin";
$subject= "Admin Contact";
$recipient="
admin@domain.com";
$header = "From: $nickname <$email> ";
$content= "
Dear $recipientname, $nickname has sent you an e-mail from $yourwebsite.
Message:
$message";
mail($recipient, $subject, $header, $content);
echo "Thanks! Your e-mail has been sent succesfully $nickname. We will contact you back on $email ASAP";
}
?>
<!----- THE HTML FORM (PASTE ANYWHERE IN UR HTML PAGE -----!>
<p>
<form action="contact1.php" method="post"> <div align="center"><span class="style1"><b>Name:</b></span><br />
<input name="nickname" type="text" value="Your name/nickname" size="40" />
<br />
<br />
<span class="style1"><b>E-mail:</b></span><br />
<input name="email" type="text" value="Your E-mail" size="40" />
<br />
<br />
<span class="style1"><b>Message:</b></span><br />
<textarea name="message" rows="10" cols="50">
</textarea>
<br />
<input type="hidden" name="ip" value="<? echo $REMOTE_ADDR; ?>" />
<input name="Submit" type="submit" value="Submit" />
<input name="Submit" type="reset" value="Reset" />
</div>
</form>
</p>