Hello everyone. I am designing a website using html and just recently php for the contact form.
You enter in your subject and message and hit send. Unfortunately, the message is not showing up in my inbox.
Here is the code for the html in the contact form:
And for the php:
I enter in the subject and message, hit send, and it either sends me to the php page and shows the code, or if I fully specify the full path (localhost/day-tool/process_form.php) in the action attribute, it brings me to the web page and says, "Thank you for sending email" but the message does not show up in my inbox. Either way, I am not receiving the mail.
What am I doing wrong?
You enter in your subject and message and hit send. Unfortunately, the message is not showing up in my inbox.
Here is the code for the html in the contact form:
Code:
<form action="process_form.php" method="post">
<table align="center" width="100">
<tr><td>Subject: <input type="text" name="subject"></td></tr>
<tr><td>Your Message: <textarea name="message" rows="2" cols="20"></textarea></td></tr>
<tr><td><input type="submit" value="Send"></td></tr>
</table>
</form>
And for the php:
PHP:
<?php
$email = 'myemailaddress@gmail.com'; // removed for post
$subject = $HTTP_POST_VARS['subject'];
$message = $HTTP_POST_VARS['message'];
mail($email, $subject, $message);
echo "<h4>Thank you for sending email</h4>";
?>
I enter in the subject and message, hit send, and it either sends me to the php page and shows the code, or if I fully specify the full path (localhost/day-tool/process_form.php) in the action attribute, it brings me to the web page and says, "Thank you for sending email" but the message does not show up in my inbox. Either way, I am not receiving the mail.
What am I doing wrong?