#!"C:\Users\Caio Batinga\AppData\Local\Programs\Python\Python38\python.exe"
print("Content-type:  text/html\n\n")
import cgi
import mysql.connector

con = mysql.connector.connect(user='caio', password='root', host='localhost', database='directory')
cur = con.cursor()

form = cgi.FieldStorage()

id = form.getvalue("id")
password= form.getvalue("password")
sql = "Select username, password from users where username = %s and password = %s"
cur.execute(sql, (id, password))
checkusername = cur.fetchall()
cur.close()
con.close()

if not checkusername:
    print("Invalid login")

else: print("""<meta http-equiv="refresh" content="0; url=http://127.0.0.1/project/page1.html" />""")
adb40109d999d0926c1479d28583ad0ca58b58ac
<mask token>

print('Content-type:  text/html\n\n')
<mask token>
cur.execute(sql, (id, password))
<mask token>
cur.close()
con.close()
if not checkusername:
    print('Invalid login')
else:
    print(
        '<meta http-equiv="refresh" content="0; url=http://127.0.0.1/project/page1.html" />'
        )

print('Content-type:  text/html\n\n')
<mask token>
con = mysql.connector.connect(user='caio', password='root', host=
    'localhost', database='directory')
cur = con.cursor()
form = cgi.FieldStorage()
id = form.getvalue('id')
password = form.getvalue('password')
sql = (
    'Select username, password from users where username = %s and password = %s'
    )
cur.execute(sql, (id, password))
checkusername = cur.fetchall()
cur.close()
con.close()
if not checkusername:
    print('Invalid login')
else:
    print(
        '<meta http-equiv="refresh" content="0; url=http://127.0.0.1/project/page1.html" />'
        )

print('Content-type:  text/html\n\n')
import cgi
import mysql.connector
con = mysql.connector.connect(user='caio', password='root', host=
    'localhost', database='directory')
cur = con.cursor()
form = cgi.FieldStorage()
id = form.getvalue('id')
password = form.getvalue('password')
sql = (
    'Select username, password from users where username = %s and password = %s'
    )
cur.execute(sql, (id, password))
checkusername = cur.fetchall()
cur.close()
con.close()
if not checkusername:
    print('Invalid login')
else:
    print(
        '<meta http-equiv="refresh" content="0; url=http://127.0.0.1/project/page1.html" />'
        )

#!"C:\Users\Caio Batinga\AppData\Local\Programs\Python\Python38\python.exe"
print("Content-type:  text/html\n\n")
import cgi
import mysql.connector

con = mysql.connector.connect(user='caio', password='root', host='localhost', database='directory')
cur = con.cursor()

form = cgi.FieldStorage()

id = form.getvalue("id")
password= form.getvalue("password")
sql = "Select username, password from users where username = %s and password = %s"
cur.execute(sql, (id, password))
checkusername = cur.fetchall()
cur.close()
con.close()

if not checkusername:
    print("Invalid login")

else: print("""<meta http-equiv="refresh" content="0; url=http://127.0.0.1/project/page1.html" />""")