yea.........!
i have hardly get this codings.
this in contact.html
HTML Code:
<form method="POST" action="contact.php">
Fields marked (*) are required
<p>Name:
<input type="text" name="Name">
<p>Address:
<input type="text" name="Address">
<p>Phone:
<input type="text" name="Phone">
<p>Website:
<input type="text" name="Website">
<p>Comments:
<textarea name="Comments"></textarea>
<p><input type="submit" name="submit" value="Submit">
</form>
and this in contact.php
PHP Code:
<?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = "Server...email from";
$EmailTo = "gyanuman@gmail.com";
$Subject = "Msg from server.....subject";
$Name = Trim(stripslashes($_POST['Name']));
$Address = Trim(stripslashes($_POST['Address']));
$Phone = Trim(stripslashes($_POST['Phone']));
$Website = Trim(stripslashes($_POST['Website']));
$Comments = Trim(stripslashes($_POST['Comments']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "\n";
$Body .= "Website: ";
$Body .= $Website;
$Body .= "\n";
$Body .= "Comments: ";
$Body .= $Comments;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "The message has been send";
}
else{
print "The message was send";
}
?>