Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'header.php';
- include 'menu.php';
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "dropship";
- //passing variables
- $name = $_POST["name"];
- $address = $_POST["address"];
- $ic = $_POST["ic"];
- $gender = $_POST["gender"];
- $warga = $_POST["warga"];
- $bangsa = $_POST["bangsa"];
- $status = $_POST["status"];
- $tel = $_POST["tel"];
- $rumah = $_POST["rumah"];
- $pejabat = $_POST["pejabat"];
- $mBank = $_POST["mBank"];
- $nBank = $_POST["nBank"];
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO maklumat pemohon VALUES (null, '$name', '$address', '$ic', '$gender', '$warga', '$bangsa', '$status', '$tel', '$rumah', '$pejabat', '$mBank', '$nBank', 1, 1)";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- include 'footer.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement