Posts Tagged ‘php e-mail’

PHP tutorial: simple contact form using the mail() function

October 4th, 2009

Here is an extremely simple way to create a contact form with PHP and the mail() function.
Copy the code above and keep reading..
<?
if ($_POST){
$to = “youremail@gmail.com”;
$subject = “YOUR SUBJECT”;
$email = $_REQUEST["email"];
$name = $_REQUEST["name"];
$message = “Name: “.$name.”\r\n”. “Email: “.$email.”\r\n”. “Message: “.$_REQUEST["message"];
$headers = “From: $email”; mail($to, $subject, $message, $headers);
echo “Thanks for submitting.”;
}
else
{
?>
<html>
<head>
<title>Contact Us</title>
<body>
<table>
<form action=’email.php’ method=’post’>
<tr>
<td>
Your Name:
</td>
<td><input type=’text’ [...]

Sedo - Buy and Sell Domain Names and Websites project info: jspromotion.com Statistics for project jspromotion.com etracker web controlling instead of log file analysis
This website might be for sale. Click here for details.
Close it.