Jump to content

EMail Form Help


Xocyl

Recommended Posts

Alright, so I am a PHP newbie, just started today! I have been learning for the past 4 hours though, so most of the terms you tell me I will understand. Now I will cut to the chase. I am writing a comment email form (as you would see if you were submitting a bug) Where all you do is type in your email and the message and then the form action sends you to my sendEmail.php with POST. I will get both files set up on here, but I need to know why I am not receiving the test email's I have sent  ???

 

Submit Comment

<html>
<head>
<title>PHP</title>
</head>
<body>

<fieldset>
<legend><b>E-Mail Form</b></legend>
<form action="sendMail.php" method="post">
E-Mail:
<br />
<input type="text" name="from" />
<br />
Message:
<br />
<textarea cols="40" rows="15" name="message"></textarea>
<br />
<input type="submit" value="Send"/>
</form>
</fieldset>

</body>
</head>

 

sendMail.php

<html>
<head>
<title>PHP welcome!</title>
</head>
<body>
<center>

<?php
$message=$_REQUEST['message'];
$from=$_REQUEST['from'];
$to="[email protected]";
$subject="Comment PHP";
mail( $to, "Subject: $subject", $message, "From: $from" );
echo "Mail Successfully Sent.";
?>

<br />

<a href="phptest.php">Send Another</a>


</center>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/56472-email-form-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.