rharris07
10-25-2006, 01:10 AM
Hello everyone, I have a problem with a PHP email form and was wondering if I could get some help here.
I have a simple form on a contact page asking for email, subject title, and message. Once the user hits Send, it takes them to a confirmation page, and there is my problem.
This is what I have for that confirmation page -
<?php
$to = "email@address.com";
$headers = "From: " . $from . "\r\n";
$headers .= "Reply-To: " . $from . "\r\n";
$headers .= "Return-Path: " . $from . "\r\n";
$from = $_POST['sender']; if ( ereg("\r",$from) || ereg("\n",$from) || ereg("%",$from) ) die("Why ?? ");
if ( mail($to,$subject,$message,$headers) ) {
echo
"The email has been sent.
<br><br>
<a href='index.html'>Click here to Return</a>";
}else{
echo "The email has failed.
<br><br>
<a href='index.html'>Click here to Return</a>";
}
?>
Here is my question - how do I make this page look like the rest of the site? I don't know PHP well enough to create a look for this page, instead of the plain white page with black lettering.
I appreciate any help I can get!!
Thanks so much,
Ryan
I have a simple form on a contact page asking for email, subject title, and message. Once the user hits Send, it takes them to a confirmation page, and there is my problem.
This is what I have for that confirmation page -
<?php
$to = "email@address.com";
$headers = "From: " . $from . "\r\n";
$headers .= "Reply-To: " . $from . "\r\n";
$headers .= "Return-Path: " . $from . "\r\n";
$from = $_POST['sender']; if ( ereg("\r",$from) || ereg("\n",$from) || ereg("%",$from) ) die("Why ?? ");
if ( mail($to,$subject,$message,$headers) ) {
echo
"The email has been sent.
<br><br>
<a href='index.html'>Click here to Return</a>";
}else{
echo "The email has failed.
<br><br>
<a href='index.html'>Click here to Return</a>";
}
?>
Here is my question - how do I make this page look like the rest of the site? I don't know PHP well enough to create a look for this page, instead of the plain white page with black lettering.
I appreciate any help I can get!!
Thanks so much,
Ryan