<>Sending a mail from php is so simple with the mail function available from php. It mainly requires three parameters ,1. to Paramater : A string representing a mail address to whom the mail has to be sent.
2. Subject Parameter : A string representing the subject of the mail.
3. Message Parameter : A string representing the actual message of the mail.
Below example code is a simple web page consisting of text fields
<?
if($_POST[submit]){ // Checks to see if the form has been submitted or not
$to = “YOUREMAIL@YOURSITE.COM“; // Your Email Address
$subject = $_POST[’subject’]; // Gets the fields from the form
$message = $_POST[’message’];
if($subject==NULL|$message==NULL) { // Checks to see if the fields are left blank and if so it display the message
die(”Sorry, but one of the fields was left blank. Please Return To The Form”);
}
$mailsend = mail($to,$subject,$message); // Puts the information into order and then sends it
{
header(”Location: ?message=Thank you”); // Redirects the page back to contact.php and then displays a message
}
}
?><form method=”POST” action=”submit.php”>
<p><label for=”fp2″>Subject:<br>
</label>
<input type=”text” name=”subject” size=”20″ id=”fp2″><br>
<label for=”fp1″>Message:<br>
</label>
<textarea rows=”6″ name=”message” cols=”16″ id=”fp1″></textarea><br>
<input type=”submit” value=”Submit” name=”submit”><input type=”reset” value=”Reset” name=”B2″></p>
</form>
<? echo $message ?>
This entry was posted
on Saturday, June 23rd, 2007 at 6:58 am and is filed under Programming.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
free non porn pregnancy sex photos
cameron diaz naked and tyra banks too
gay nude cowboys
japanes free porn
devil in miss jones porn
gay monster anal sex
filipino twinks teens cock gay 18
teen gay having sex