hopingsteam

Login php

Sep 28th, 2018
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function user_login() {
  2.     $login_user = "alex";
  3.     $login_pass = "parola";
  4.        
  5.     $query = "SELECT * FROM `users` WHERE (`username`='".$login_user."' OR `email`='".$login_user."') AND `password`='".$login_pass."' LIMIT 1";
  6.     $result = $db_link->query($query);
  7.        
  8.     while ($row=$result->fetch_assoc())
  9.     {
  10.         if (!empty($row))
  11.         {
  12.             //Totul bine
  13.             return true;
  14.         }
  15.     }
  16.     return false;
  17. }
RAW Paste Data