Email cannot work

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
khoonchee
Forum Newbie
Posts: 3
Joined: Tue Jun 18, 2002 12:09 am

Email cannot work

Post by khoonchee »

Hello guys,
I had wrote a sending mail php scripts.I can receive the mail but one problem is that I cannot receive the value that passed in.Below are the code:

-- > The html form that receive info from user :

<html>
<title> Email Testing </title>
<head></head>

<body>
<form name="form" method="post" action="contact_thanks.php">
<p class="bodymd">Your Name<br>
<input type="text" name="Name">
</p>
<p class="bodymd">Your Email<br>
<input type="text" name="Email">
</p>
<p class="bodymd">Comments or Questions<br>
<textarea name="Comments" rows="5" cols="40"></textarea>
</p>
<p class="bodymd">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Clear Form">
</p>
</form>

</body>
</html>


-- > The php scripts that execute :

<html>
<title> Email Testing </title>
<head></head>

<body>

<?php
$message = "Name: $Name\nEmail: $Email\nComments: $Comments\n";
$extra = "From: $Name\r\nReply-To: $Email\r\n";
mail ("andy@to88.com", "Website Email", $message, $extra);
echo "<p class=bodymd>Thanks for your inguiry, $Name.</p>";
echo "<p class=bodymd>A response will be sent to $Email as soon as possible.</p>";

?>

</body>
</html>


Hope you guys can help me figure out why?

My web server got the PHP version 4.2.1installed.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

khoonchee
Forum Newbie
Posts: 3
Joined: Tue Jun 18, 2002 12:09 am

Post by khoonchee »

Hello Mac,

Thanks for the reply.

I get what you meant now.. :lol:
Post Reply