| View previous topic :: View next topic |
| Author |
Message |
deleted user 111213 Grandmaster Cheater
Reputation: 0
Joined: 09 Nov 2007 Posts: 714
|
Posted: Sat Nov 08, 2008 9:04 am Post subject: problem with email/contact form |
|
|
i have an email for setup. it delivers the mail but turns out like this. without the message
here is the html form
| Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="contact.php" method="post">
Name: <input type="text" name="name" /><br />
Email: <input type="text" name="email" /><br />
Title: <input type="text" name="title" /><br />
Message: <textarea cols="40" rows="5" name="message"></textarea><br />
<input type="submit" value="Send" /><br />
</form>
</body>
</html> |
and the contact.php
| Code: | <?php
$to = "[email protected]";
$subject = $_POST["title"];
$name = $_POST["name"];
$message = $_POST["message"];
$messgaesent = "From: $name Message: $message";
$from = $_POST["email"];
$headers = "From: $from";
mail($to,$subject,$messagesent,$headers);
echo "Your message has been sent, Thanks. <a href='index.php'>Click here</a> to return to the main page";
?> |
is there anyway i could fix it?
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sat Nov 08, 2008 12:40 pm Post subject: |
|
|
Try this for contact.php:
| Code: | <?php
$to = "[email protected]";
$subject = $_POST["title"];
$name = $_POST["name"];
$message = $_POST["message"];
// $messgaesent = "From: $name Message: $message"; // Get rid of this
$from = $_POST["email"];
$headers = "From: $from";
// mail($to, $subject, $messagesent, $headers); // Use message instead of messagesent
mail($to, $subject, $message, $headers);
echo "Your message has been sent, Thanks. <a href='index.php'>Click here</a> to return to the main page";
?> |
I edited the only thing I saw that might be a problem.
It probably won't work but it is just a guess.
|
|
| Back to top |
|
 |
deleted user 111213 Grandmaster Cheater
Reputation: 0
Joined: 09 Nov 2007 Posts: 714
|
Posted: Sat Nov 08, 2008 1:56 pm Post subject: |
|
|
| thankyou once again. man u gonna get +rep again.
|
|
| Back to top |
|
 |
|