Cara atau contoh script mail form dengan PHP

Dengan PHP, Anda dapat membuat sebuah Komentar atau formulir di website kamu. Contoh di bawah ini mengirimkan pesan teks ke alamat e-mail tertentu



if (isset($_REQUEST[’email’]))

//if “email” is filled out, send email


//send email

$email = $_REQUEST[’email’] ;

$subject = $_REQUEST[‘subject’] ;

$message = $_REQUEST[‘message’] ;

mail(““, “$subject”, $message, “From:” . $email);

echo “Thank you for using our mail form”;



//if “email” is not filled out, display the form


echo “<form method=’post’ action=’form.php‘>

Email: <input name=’email‘ type=’text’ /><br />

Subject: <input name=’subject’ type=’text’ /><br />

Message:<br />

<textarea name=’message’ rows=’15’ cols=’40’>

</textarea><br />

<input type=’submit’ />





8 thoughts on “Cara atau contoh script mail form dengan PHP

  1. zotrim uk

    Simply wish to say your article is as surprising. The clearness in your post is simply nice and i could assume you’re an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the gratifying work.

  2. Nestor Kisiel

    This blog appears to get a large ammount of site visitors. How can you get visitors to this? This gives a good individual twist upon things. I suppose getting something genuine or considerable to provide information on is the most important factor.

    1. admin Post author

      I am as usual, when I upload there is a unique, love the information. and one of them is in my daily life.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>