Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_POST['kirim']){
- $admin = 'fyn250976@gmail.com'; //ganti email dg email admin (email penerima pesan)
- $nama = htmlentities($_POST['nama']);
- $namail = htmlentities($_POST['namail']);
- $judul = htmlentities($_POST['judul']);
- $pesan = htmlentities($_POST['pesan']);
- $pengirim = 'Dari: '.$nama.' <'.$namail.'>';
- if(mail($admin, $judul, $pesan, $pengirim)){
- echo 'SUCCESS: Pesan anda berhasil di kirim. <a href="index.php">Kembali</a>';
- }else{
- echo 'ERROR: Pesan anda gagal di kirim silahkan coba lagi. <a href="index2.php">Kembali</a>';
- }
- }else{
- header("Location: index2.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement