Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'conn.php';
- if(ISSET($_POST['save'])){
- if(!empty($_POST['firstname']) && !empty($_POST['lastname']) && !empty($_POST['address']) && !empty($_POST['job'])){
- $firstname = $_POST['firstname'];
- $lastname = $_POST['lastname'];
- $address = $_POST['address'];
- $job = $_POST['job'];
- $conn->query("INSERT INTO `member` VALUE('', '$firstname', '$lastname', '$address', '$job')") or die(mysqli_errno());
- header('location: index.php');
- }else{
- echo "<script>alert('Please complete the required field!')</script>";
- echo "<script>window.location = 'index.php'</script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment