I am just creating a login page using sqlite3 using it to save email id and its password so that I can check while login weather password is correct or not I did it till log in /signup it saves id password but while loging in i need to search whather the password is correct or not...........
import sqlite3
conn = sqlite3.connect('test.db')
conn.execute('create table id(email varchar(40), password varchar(30));') while True:
form=input("\nsignup or login: ")
if form== 'signup' :
email=input("input your email id: ")
if "@" and "." in email:
password=input("create password: ")
conn.execute('insert into id values(?, ?);', (email, password))
if len(password) >= 6:
rpassword=input("renter password: ")
if password == rpassword:
print("sucessfully created")
break
else:
print("Passwords didn't match")
else:
print("Your password is too short")
if form == 'login' :
email2=input("your email ")
if "@" and "." in email2:
password2=input("your password ")
Aucun commentaire:
Enregistrer un commentaire