[mysql] sql
Viewer
- // Check If form submitted, insert form data into users table.
- if (isset($_POST['Submit'])) {
- $name = $_POST['name'];
- $kelas = $_POST['kelas'];
- $jenkel = $_POST['jenkel'];
- $tgllahir = $_POST['tgllahir'];
- $tmplahir = $_POST['tmplahir'];
- $nohp = $_POST['nohp'];
- $alamat = $_POST['alamat'];
- $email = $_POST['email'];
- // include database connection file
- include_once("config.php");
- // Insert user data into table
- $result = mysqli_query($mysqli, "INSERT INTO `users`(`name`, `kelas`, `jenkel`, `tgllahir`, `tmplahir`, `nohp`, `alamat`, `email`) VALUES ('$name','$kelas','$jenkel','$tgllahir','$tmplahir','$nohp','$alamat','$email')");
Editor
You can edit this paste and save as new: