Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

process_login.php 806B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once('config.php');
  3. //initialize php variables used in the form
  4. $username = "";
  5. $password = "";
  6. $error = "";
  7. $remember = false;
  8. //check to see that the form has been submitted
  9. if(isset($_POST))
  10. {
  11. $username = rawurldecode($_POST['username']);
  12. $password = rawurldecode($_POST['password']);
  13. $remember_me = rawurldecode($_POST['remember_me']);
  14. if ($remember_me == "true")
  15. {
  16. $remember = true;
  17. }
  18. if ($userTools->login($username, hashPassword($password, $CONF), $remember, $CONF))
  19. {
  20. $user = unserialize($_SESSION[$CONF['session_prefix'].'user']);
  21. $user->save($db);
  22. //successful login, redirect them to a page
  23. echo "true";
  24. }
  25. else
  26. {
  27. echo "false";
  28. }
  29. }
  30. else
  31. {
  32. echo "false";
  33. }
  34. ?>