PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I email the contents of a form to me?


The mail function is used to send email in PHP. People are amazed how easy it is to send a simple email with PHP and think there must be a catch or a complicated method, but in fact it's really simple.

The mail function can take several parameters, however for a simple email all you need are the first three - who it is to, the title of the email (subject) and the contents of the message (body).

Thus if your web server is configured to allow use of the mail function on PHP, this will send an email:

<?php
mail
("me@myaddress.com","Hello me","That was easy wasn't it?");
?>



Comment on this Question and Answer >>>

ASK A QUESTION

More forms PHP Questions

How do I save text inside a textarea so that it can be updated later?

How do I make a website field mandatory?

how do i validate the name into form ?

I currently use this form on my site: Name

I am having a form. Here, i am submitting the form using java script as its necessary. If the form method is get, i am able to get in redirection page and can get the hidden values in the form. But if the form method is post, i am not able to get those hi



Custom Search