To create login program in python UserPageVisits:653 active 80 80 DaniWeb 561 60 2019-07-05T20:02:39+00:00

To create login program in python


Login program

About the Author
code snippet
class Login:
    error = None
    def __init__(self, uid, passw):
        self.uid = "abc"
        self.passw = "123"
        Login.error = "Enter a valid user id and password"
    def authenticate(self):
        if (self.uid == logid and self.passw == logpass):
            print ("Login successful")
            print (Login.error)
log = Login("", "")
logid = input("Enter your user ID: ")
logpass = input("Enter your password: ")


I hope you realize this is a prime example of a bad login system. It's a fairly safe bet the data is in the clear.

Never teach this old method ever again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.