Hi,
I'm just learning how to create a script that will echo a message to the browser and also send the contents of a form to an email address once the submit button is pressed.
I'm trying to test it out with some code I got from a book, and I've attached the file with the php code in it in case someone would like to have a look (the instructions on this site didn't say you could attach a php file so I've made it a txt file just for troubleshooting). Since you can't attach two files on this forum, the html form code is:
<HTML>
<HEAD>
<TITLE>E-Mail Form</TITLE>
</HEAD>
<BODY>
<FORM action="sendmail.php" method="POST">
<p><strong>Name:</strong><br> <INPUT type="text" size="25" name="name"></p>
<p><strong>E-Mail Address:</strong><br> <INPUT type="text" size="25" name="email"></p>
<p><strong>Message:</strong><br>
<textarea name="message" cols=30 rows=5></textarea></p>
<p><INPUT type="submit" value="send"></p>
</FORM>
</BODY>
</HTML>
Basically, it's echoing to the browser correctly but it's not sending the contents of the form to my email address. I know that the recipient variable is only generic at the moment but I did test it with my email address and it still didn't work.
I'm using a Macintosh computer, OS 10.3.9, php5 and Apache. I was just wondering does it have something to do with the php.ini file - I mean do I need to adjust anything here?
Would really appreciate if someone could take a look at the files I've uploaded to help me troubleshoot.
Thanks