Jumat, 08 Januari 2016


Sintak Simpan.php

<?php
 if(isset($_POST["Simpan"])){
           $id=$_POST["id"];
           $nama=$_POST["nama"];
           $email=$_POST["email"];
           $pesan=$_POST["pesan"];
                     
           $sql="INSERT INTO tb_bukutamu VALUES ('$id','$nama','$email','$pesan')";
           $q=mysql_query($sql);
           if($q){
                    echo"<script>alert('data berhasil disimpan');document.location.href='?halaman=tampil_bukutamu';</script>";
                    } 
           else{
                    echo"<script>alert('data gagal disimpan');document.location.href='?halaman=tampil_bukutamu';</script>";
                    }
   }
 

?>