Guest User

Untitled

a guest
Jun 22nd, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2.  
  3. if ($_POST['go']) {
  4. $username = $_POST['txt']; $email_address = "ani@ba.com";
  5. $password = "12345678"; $group_id = 2; $user_type = USER_NORMAL;
  6. include "forum/includes/functions_user.php";
  7. $user_row = array(
  8. 'username' => $username,
  9. 'user_password' => phpbb_hash($password),
  10. 'user_email' => $email_address,
  11. 'group_id' => (int) $group_id,
  12. 'user_timezone' => (float) $timezone,
  13. 'user_dst' => $is_dst,
  14. 'user_lang' => $language,
  15. 'user_type' => $user_type,
  16. 'user_actkey' => $user_actkey,
  17. 'user_ip' => $user_ip,
  18. 'user_regdate' => $registration_time,
  19. 'user_inactive_reason' => $user_inactive_reason,
  20. 'user_inactive_time' => $user_inactive_time,
  21. );
  22. // all the information has been compiled, add the user
  23. // tables affected: users table, profile_fields_data table, groups table, and config table.
  24. $user_id = user_add($user_row);
  25. echo "user: $user_id";
  26. }
  27. echo "
  28. <form action='".$_SERVER['PHP_SELF']."' method='POST'>
  29. <input type=text name=txt><input type=submit name=go>
  30. </form>
  31. ";
  32. ?>
Add Comment
Please, Sign In to add comment