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!
I know I am going to ask a silly question. But there is no way out. I have developed a HTML website. Now It has a "contact us" form. Now the client want that the details which the user will enter in the form should go to his email address.
I searched a lot and got the answer it is done by using php script. Then I made a php script. But I am unable to send the email. I am doing like this:
1. I beleive this post goes into the php code section.
@moderator.. please shift to php code section.
2. What is the output that you are getting?
3. Please turn the error reporting on. (either in php.ini file or add this line..)
You problem is probably related to the mail() function.
The fourth argument should be mail headers. You've just given it a string email address. If you want it to look like it comes from that email then you should use the 'From:' header. Also, it looks like you're using a HTML email format, but you're sending in plain text, again this is where headers come in. Try the following:
[ /code] tags when posting code blocks in the forums.
You may also want to read:
[list=1]
[*][url=http://forums.devnetwork.net/viewtopic.php?t=8815]General Posting Guidelines[/url]
[*][url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url]
[*][url=http://php.net/]PHP Manual[/url]
[*][url=http://www.google.com/search?client=opera&rls=en&q=php+tutorials&sourceid=opera&ie=utf-8&oe=utf-8]PHP Tutorials[/url][/list]
:arrow: Moved to PHP - Code