title: How to prevent duplicate entries in my login/register application?
body: <p>I am making a basic login/register Python application, later I plan to add different privileges to users, however I realized there's no way to prevent copycat users from registering with clone info. Here is my register code:</p>
  <pre><code>def Register():
  #connect to database
  conn = sqlite3.connect(&quot;projectx.db&quot;)
          #sqlite3.connect(&quot;:memory:&quot;) for temp
  #create cursor
  c = conn.cursor()
  
  firstname = input(&quot;What is your first name?:&quot;)
  lastname = input(&quot;What is your last name?:&quot;)
  email = input(&quot;What is your email?:&quot;)
  print(email)
  emailconfirm = input(&quot;Confirm your email:&quot;)
  
  if (email == emailconfirm):
      username = input(&quot;Create Username:&quot;)
      password = input(&quot;Enter Password:&quot;)
      member_info = [
                      (firstname, lastname, email, username, password)
                  ]
  
      c.executemany(&quot;INSERT INTO members VALUES (?,?,?,?,?)&quot;, member_info)
      print(&quot;Successfully Registered &quot; + username)
  else:
      print(&quot;Please review email!!&quot;)
  
      #commit command/save our progress
  conn.commit()
  #close connection
  conn.close()
  </code></pre>