2010-01-06, 12:39:08
Your <title></title> tags are wrapped around your meta data. (Nothing to do with your issue though)
Give this code a shot instead.
I've modified everything for you so you can drop it right in. You just need to modify the TO field.
I haven't tested it, but it should work.
Give this code a shot instead.
I've modified everything for you so you can drop it right in. You just need to modify the TO field.
Code:
<?
// PUT THIS ABOVE THE FORM
// MODIFY THE DETAILS
if($_POST["submit"] == true) {
$to = "your@emailaddress.com";
$subject = "Contact From Website";
$message = "Name: ".$_POST["name"];
$message = $message."\n". "E-mail: ".$_POST["email"];
$message = $message."\n". "Message: ".$_POST["message"];
mail($to, $subject, $message);
$successmsg = "<div id=\"successmsg\">Form Submitted Successfully</div>"; // Use CSS to style the id successmsg
} else {
$successmgs = "";
}
?>
<?php // PUT THIS IN PLACE OF YOUR CURRENT FORM ?>
<?php echo $successmsg; ?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" class="contactform" >
<p><label>Name:</label><br />
<input type="text" class="text" name="name" /></p>
<p><label>Email:</label><br />
<input type="text" class="text" name="email" /></p>
<p><label>Message:</label><br />
<textarea class="text" name="message" ></textarea></p>
<p><input type="submit" class="submit" value="Send Email" id="contact-submit" name="submit" /></p>
</form>
I haven't tested it, but it should work.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.
Have you ever coded in your underwear before?
Have you ever coded in your underwear before?