Chapter 16 - Login.Php in PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition) Posted August 30, 2013 Thank you for your response, jorgeLP and Larry. jorgeLP, I might not explain about the situation. Through chapter 16 of the book, it is not necessary to insert the login data because users register the data through register.php and we may make sure whether the login data matches registered data. Larry, I found out the cause after I broke down the query into its three conditions as your advice. I learned the one method to clear up the cause. Thank you very much.