PHP Tutorial: Professional Login System v2 (Part 1)
Uploader Comments (phpclass)
All Comments (40)
-
did u try exit;
-
STOP hurting that keyboard....
-
what about if i want to set the logout?
i try session_destroy() but that's not work
-
im trying to post data to my php class from my html page but when i call isset() on the post it returns false! damn it!
-
hi! i was just womdering why the POST method is redirected to itself!
-
@phpclass I am a beginner in php and I wanted to learn the codes that you used in your login tutorial, do you also have tutorials about those codes that you have put into your login tutorial?
-
Great Tutorial!
What about cookies? Most PHP login systems use cookies or PHPSESSIONIDs that are added to URLs.
How do you handle the logout functionality? Would it be enough to unset the Session vars for ID,username and password?
Thanks a lot!
Hi, let's say I do not want to restrict users to use letters/numbers only passwords (which I find really annoying as a user myself)... I wonder if replacing the preg_replace with mysql_real_escape_string would introduce any security flow in the login system?
And thank you very much for this instructive video! The way you write the code looks really professional - keep going!
zholud 1 year ago
@zholud Yes you can use the mysql_real_escape_string function to escape special characters and it won't cause a direct security hole as far as I know. However, there are some limitations. If your allowing special characters you have to use addslashes() to escape the '%' if your doing a wildcard sql query. Second, mysql escape function is not 100% safe and there could be a breach in your statement.
phpclass 1 year ago