SHARE
TWEET

Untitled

a guest Mar 19th, 2016 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. ini_set('display_errors', 1);
  4. ini_set('display_startup_errors', 1);
  5. error_reporting(E_ALL);
  6. error_reporting(E_ALL ^ E_DEPRECATED);
  7.  
  8. $nama           = $_POST['nama'];
  9. $tanggal_lahir  = $_POST['tanggal_lahir'];
  10. $alamat         = $_POST['alamat'];
  11. $kota           = $_POST['kota'];
  12. $pekerjaan      = $_POST['pekerjaan'];
  13. $jenis_kelamin  = $_POST['jenis_kelamin'];
  14. //$hobby          = $_POST ['hobby'];
  15. $membaca        =$_POST['membaca'];
  16. $menulis        =$_POST['menulis'];
  17. $memancing      =$_POST['memancing'];
  18.  
  19. include "database.php";
  20.  
  21. //$db = mysql_select_db("learndb",$conn);
  22. //$query = mysql_query("insert into form set nama ='$nama', umur='$usia'");
  23.  
  24. //$servername = "localhost";
  25. //$username = "root";
  26. //$password = "mysql";
  27.  
  28. // Create connection
  29. //$conn = mysql_connect($servername, $username, $password);
  30.  
  31. $db = mysql_select_db("learndb",$conn);
  32.  
  33. $query = mysql_query("insert into learnd1 set nama ='$nama', tanggal_lahir ='$tanggal_lahir', alamat ='$alamat', kota ='$kota', pekerjaan ='$pekerjaan', jenis_kelamin ='$jenis_kelamin', hobby ='$membaca $menulis $memancing'");
  34.  
  35.  
  36.  //   echo"<a href='index.php'>Input Lagi</a></br>";
  37. //    echo"<a href="view.php">Lihat Hasil Input</a>";
  38. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top