Guest User

Untitled

a guest
Jul 8th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. db = MySQLdb.connect(host= "127.0.0.1",
  2. user="root",
  3. passwd="",
  4. db="logindb")
  5. query = db.cursor()
  6.  
  7. loop= 'true'
  8. while (loop == 'true'):
  9. name=raw_input("Enter name:")
  10. username=raw_input("Enter Username:")
  11. password=raw_input("Enter Password:")
  12. confirm_password=raw_input("Re-Enter Password:")
  13. mail=raw_input("Enter E-mail:")
  14. dob=raw_input("Enter DOB:")
  15. bloodgrp=raw_input("Enter the bloodgroup:")
  16. city=raw_input("Enter city:")
  17. mobile=raw_input("Enter the mobile number:")
  18. if(password == confirm_password):
  19. query.execute("INSERT INTO `login` (`username`,`password`) VALUES(%s,%s)",username,password)
  20. query.execute("INSERT INTO `signup` (`name`) VALUES (%s)",name)
  21. query.execute("INSERT INTO `signup` (`mail`) VALUES (%s)",mail)
  22. query.execute("INSERT INTO `signup` (`dob`) VALUES (%s)",dob)
  23. query.execute("INSERT INTO `signup` (`bloodgrp`) VALUES (%s)",bloodgrp)
  24. query.execute("INSERT INTO `signup` (`city`) VALUES (%s)",city)
  25. query.execute("INSERT INTO `signup` (`mobile`) VALUES (%d,)",mobile)
  26. db.commit()
  27. print "saved"
  28. else:
  29. prnit "Failed"
  30.  
  31. File "signup.py", line 26
  32. query.execute("INSERT INTO `signup` (`name`) VALUES (%s)",name)
  33. ^
  34. IndentationError: unindent does not match any outer indentation level
Add Comment
Please, Sign In to add comment