Guest User

Untitled

a guest
Aug 3rd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // get database connection
  2. $db = pdoDB::getConnection();
  3. // if userid and password is set
  4. $userid = $_REQUEST["userid"];
  5. $password = $_REQUEST["password"];
  6. $sql = $db->prepare("select username, password, userID
  7. from l_user
  8. where userID = :userid");
  9. $stmt = $sql->execute(array(':userid' => $userid));
  10. //$stmt = $db->query($sql);
  11.  
  12. $dbPassword = "";
  13. $dbUserid = "";
  14.  
  15. // loop through and get data
  16. while ($result = $stmt->fetch(PDO::FETCH_OBJ)) {
  17. $dbUserid = $result->userID;
  18. $username = $result->username;
  19. $dbPassword = $result->password;
Add Comment
Please, Sign In to add comment