Advertisement
Guest User

Untitled

a guest
Oct 9th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. if(isset($_POST['submit'])){
  2. $username = $_POST['username'];
  3. $password = $_POST['password'];
  4. $nickname = $_POST['nickname'];
  5. $email = $_POST['email'];
  6.  
  7. // print Command working here..
  8.  
  9. // Function start. this function is not working no.
  10. create_user($conn, $username, $password, $nickname, $email);
  11. header('location: index.php?All=Users');
  12. exit();
  13.  
  14. }
  15.  
  16. // Function. Include
  17. function create_user($conn, $username, $password, $nickname, $email){
  18. $timestamp = date('Y-m-d H:i:s');
  19. $user_ip = getUserIp();
  20.  
  21. $sql = "INSERT INTO `users` (`user_id`, `user_login`, `user_pass`, `user_nickname`, `user_email`, `user_status`, `timestamp`, `user_ip`)
  22. VALUES ('', '$username', '$password', '$nickname', '$email', '0', '$timestamp', '$user_ip')";
  23. $conn->query($sql) === TRUE;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement