Advertisement
Guest User

Untitled

a guest
Oct 17th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $connection = new mysqli($servername, $usernm, $password, $database, 3310);
  2. error_reporting(0);
  3. /* grab email and password from input */
  4. $user_email = $_POST['user_email'];
  5. $password = $_POST['password'];
  6. $is_email=0;
  7. $is_username=0;
  8.  
  9. if ($_POST['login'])
  10. {
  11. if ($user_email && $password)
  12. {
  13. $row = "SELECT * FROM Database";
  14. $result = $connection->query($row);
  15. $user_email = test_input($_POST["user_email"]);
  16. //check if e-mail address is well-formed
  17.  
  18. if ($result->num_rows > 0)
  19. {
  20. while($user = $result->fetch_assoc())
  21. {
  22. if (!strcasecmp($user["user_email"], $user_email))
  23. {
  24. if (!password_verify($password,$user["user_pass"]))
  25. { .... login to system set cookies .... }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement