Login Systems are everywhere these days. In a world where security is important, a login system is a must for any important software or webpage. Why don't we try and build a basic one with Python.
I am using Apache XAMPP for the SQL connection. You can use localhost/phpmyadmin page to check whether the changes are updated.
First things first, We need a database to store our emails and passwords. For this, I am using MySQL with Python. To create a database, we can use the following code.
Once you have executed this code, your Database is ready. Now add the database name to your conobj and we are ready to create the table. To create the table:
I have only added Username and Password columns. The numbers after the varchar show the maximum number of characters allowed for that column. If you require, you can add more columns like Date-of Birth, Age, Address etc. based on your requirements.
This creates a table like this:
Cool, but the table is empty. For a person to login, he must first register. So, we need to set up a way for him to enter his details so that he can login when he wants. The registration system is going to be the topic of Login System #2.
For the next post: The PYgrammer: LOGIN SYSTEM #2: Register System



Comments
Post a Comment