[mysql] sql

Viewer

  1.     // Check If form submitted, insert form data into users table.
  2.     if (isset($_POST['Submit'])) {
  3.         $name = $_POST['name'];
  4.         $kelas = $_POST['kelas'];
  5.         $jenkel = $_POST['jenkel'];
  6.         $tgllahir = $_POST['tgllahir'];
  7.         $tmplahir = $_POST['tmplahir'];
  8.         $nohp = $_POST['nohp'];
  9.         $alamat = $_POST['alamat'];
  10.         $email = $_POST['email'];
  11.  
  12.         // include database connection file
  13.         include_once("config.php");
  14.  
  15.         // Insert user data into table
  16.         $result = mysqli_query($mysqli, "INSERT INTO `users`(`name`, `kelas`, `jenkel`, `tgllahir`, `tmplahir`, `nohp`, `alamat`, `email`) VALUES ('$name','$kelas','$jenkel','$tgllahir','$tmplahir','$nohp','$alamat','$email')");
  17.  

Editor

You can edit this paste and save as new:


File Description
  • sql
  • Paste Code
  • 30 Sep-2022
  • 752 Bytes
You can Share it: