Hi, i'm just trying to make a simple 'contact us' form which emails me with the contents of each form field, here's what i have:
HTML
--------
<form action="contact.php" method="post" name="contact">
*Full Name<br />
<input name="name" type="text" /><br /><br />
*Email:<br />
<input name="email" type="email" /><br /><br />
*Message:<br />
<textarea name="msg" rows="10" cols="30"></textarea><br /><br />
<input name="reset" type="reset" value="Reset Fields" /><br />
<input name="submit" type="submit" value="Send Email" /><br />
</form>
<?php
$to = "myemail@domain.com";
$subject = "Contact Form Posting";
$message = "From: " $_POST['name'] "<" $_POST['email'] "> \n" $_POST['msg'];
$mail($to, $subject, $message);
if($mail){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
I assume the problem is with the line beginning "$message = ..." all my editor says is that there is an error....with no further details so i dunno what the problem is. There may be other errors in this too but i don't know php well enough to see them so any help would be appreciated. Also before anyone asks, the email address in my code is my actual email address ;).