Your Webhosting Questions
Answered by the Webhosting Experts
Tags
...
...

example PHP formmail script

1) Sample PHP Form Code:

<form action=phpsend.php method=post>
<br>
Your Name:
<input type=text name=name>
<br>
E-mail:
<input type=text name=email>
<br>
<input type=submit value=Submit>
</form>
2) Create a file called phphsend.php with following code (modifying with your address):

<?
//Declare the variables of your form
$recipient = “[email protected]“;
$subject = “Testing.. 1 2 3”;
$message = “Hi there!”;
$from = “PHP mailer test”;
//Contents of form
$name=$_POST[‘name’];
$email =$_POST[’email’];
//mail() function sends the mail
mail($recipient,$subject,$message,$from,” -f [email protected]);
?>

NOTE: -f [email protected] needs to be a valid user on the local domain so that it will be able to send

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: [email protected]. We are also available to you through our phone and live chat system 24/7/365.

Tags +
...