Advertisement
Guest User

Untitled

a guest
Mar 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. $firstname = "";
  3. $middlename = "";
  4. $lastname = "";
  5. $username = "";
  6. $password = "";
  7. include("conn.php");
  8. if (isset($_POST['firstname']))
  9. {
  10. $firstname= $_POST['firstname'];
  11. $middlename= $_POST['middlename'];
  12. $lastname= $_POST['lastname'];
  13. $username= $_POST['username'];
  14. $password= $_POST['password'];
  15.  
  16. $sql= 'INSERT INTO tbl_jhaiyem (firstname, middlename, lastname, username, password) VALUES("'.$firstname. '","'.$middlename. '","'.$lastname. '","'.$username. '","'.$password. '");
  17.  
  18. if(mysqli_query($conn,$sql))
  19. echo "Successfully Added!";
  20. else
  21. echo "An error occured while trying to add the record.";
  22.  
  23. }
  24. ?>
  25. <form method="post" action="submit.php">
  26. Firstname: <input type="text" name="firstname"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement