LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How does the mail function work(PHP) (https://www.linuxquestions.org/questions/programming-9/how-does-the-mail-function-work-php-323279/)

Alexander.s 05-13-2005 08:13 PM

How does the mail function work(PHP)
 
Iv done the same thing as this example.
But i cant seem to get it working, running the script threw the shell
only gives me errors on every line, and running it threw the website doesnt give any results either :(
Is there any other easy way of creating a function where people can click on a
button to email me instant.



<?php
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
?>

EDIT:
ps. should i use <form action="mail.php" method="post" or "get"> ???

david_ross 05-15-2005 09:02 AM

What errors do you get?

You can use post or get, as the names suggest though one is for sending data and one is for requesting data.


All times are GMT -5. The time now is 02:37 AM.