import mysql.connector

def DataUpdate(name, email, date, session_id):
    mydb = mysql.connector.connect(
        host = "localhost",
        user = "root",
        password = "1234",
        database = "mydatabase"
    )

    mycursor = mydb.cursor()

    #sql = "CREATE TABLE user_information (Name VARCHAR(255), Email VARCHAR(255), Date VARCHAR(255), Session ID VARCHAR(255));"
    sql = 'INSERT INTO user_data (Name, Email, Date, Session_ID) VALUES ("{}", "{}", "{}", "{}");'.format(name, email, date, session_id)

    mycursor.execute(sql)

    mydb.commit()

    print("Successful!")

#if __name__ == "__main__":
    #DataUpdate("siddharth", "siddharth@gmail.com")  
