if you do the test that djr said to and it works you can use this code as your contact.php
contact.php
PHP Code:
<?php
//EDIT THESE 2 FIELDS WITH YOUR INFO
$to = "_YOUR_EMAIL_ADDRESS_";
$subject = "_SUBJECT_OF_EMAIL_";
// NO NEED TO EDIT PAST HERE
$message = "";
foreach($_REQUEST as $k => $v) {
$message .= trim(strip_tags($k)) . ": " . trim(strip_tags($v)) . "<br>";
}
if( !mail($to, $subject, $message) )
{
echo "<p>Could Not Send Email.. Please Try Again Later</p>";
}
else
{
echo "<p>Email Sent. Thank You!</p>";
}
?>
that will take whatever is submitted and create an email out of it.
as for creating the html form part, well that is all dependent on what you wish to put in the email but a simple form is below
contact.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.01//EN "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TITLE OF PAGE</title>
</head>
<body>
<form name="form" action="contact.php" method="post">
<p>
<label>Name:</label>
<input type="text/css" name="name" value="">
</p>
<p>
<label>Email:</label>
<input type="text/css" name="email" value="">
</p>
<input type="submit" name="submit" value="Send Email">
</form>
</body>
</html>
Bookmarks