smaller e-mail

By log2 on Dec 20, 2004

This is an update on Hawkee's e-mail form, it's smaller, at least I think it is, than his and it also looks slicker in a browser, you can fit it in mostly any place! It may be smaller but his is less confusing, I must admit that

<html>
<title>email</title>
<body>
<?php
if ($submit) { // if the form was sent do the following

if($name && $subject && $email && $message ) { // if all fields were filled-in send email
mail("YOU'RE E-MAIL HERE!!!!!","$subject","$message","From: $name <$email>") or die("email error");
echo "Message Sent, Thank you for you feedback " . $name; // if all went well, display message was sent
} else {
echo "All fields must be filled in!<BR>"; // if not all were filled in, display error message
}
} // end php submission code
?>

<form action="" method="post">
Name: <br>
<input type="text" name="name">
<br>
Email: <br>
<input type="text" name="email">
<br>
Subject: <br>
<input type="text" name="subject">
<br>
Text:<br>
<textarea name="message" cols="" rows=""></textarea><br>
<input type="submit" name="submit" value="Send">
<input type="reset" name="Reset" value="Reset">
</form>
</body>
</html>

Comments

Sign in to comment.
www-   -  Mar 11, 2005

hmm... i dont get the error message All fields must be filled in!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.