http://php.flashwebhost.com/ramesh/day-12/contact1.php
PHP Code:<?php
if (isset($_POST['submit'])) {
$fromEmail = $_POST['Email'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body, 'From: ' . $Email);
echo 'Thank you for contacting us.';}
else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
<form action="contact1.php" method="POST">
Email<br> <input type="text" name="Email"><br>
Message<br> <textarea name="body" cols="30" rows="10"></textarea>
<br> <button type="submit" name="submit" value="submit">Send Mail</button></form>
</body></html>
';}





Reply With Quote

Bookmarks