Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- name = input()
- phone = input()
- bday = input()
- age = input()
- con = psycopg2.connect(
- database = 'lexanidb',
- user = 'lexani42',
- password = 'lexani42',
- host = 'localhost'
- )
- cur = con.cursor()
- cur.execute('INSERT INTO form (name, phone, bday, age) VALUES (%s, %s, %s, %s)', (name, phone, bday, age))
- con.commit()
- con.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement