Mail Form
        by j. edick. aka jubba

Well a lot of people keep asking about PHP mail forms. I don't have Flash on this computer, so I'm just going to have to make everyone stick with a regular HTML form. I will give the code and then explain that code.

Create a new PHP file and copy and paste the following code:


Now to break apart the PHP code:

$Subject "Test E-mail";
$toEmail "[email protected]";

These are variables for your e-mails subject and your target recipient's e-mail. This is generally where you put your e-mail address if you are the one that is going to be receiving the e-mail

mail($fromEmail$Subject$nMessage."\nFrom: ".$fromName."<".$fromEmail.">");

This is an if statement that checks to see if the submit button has been pressed. If yes, then it executes the script inside the brackets.
The mail() function on the inside is what sends the e-mail to you.

The mail function works like this:
mail ( string to, string subject, string message).

For any help, please post on the forums.



SUPPORTERS:'s fast and reliable hosting provided by Media Temple.