title: Getting error while inserting radio button values to oracle database from python
body: <p><strong>Linked to my previous question.</strong></p>
  
  <p>I am working on a project which will basically ask 3 questions to users and answers will be available in form of radio buttons with 2 options. Once clicked on submit after selecting the options i need the values to be inserted into oracle database. Now when i am trying to add some variables which i set already, i am getting error as <code>cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number</code></p>
  
  <p>I have created a table in oracle database called "Survey" which have below fields
  1) STAFFID
  2) MACHINE
  3) CURRENT_TIME
  4) DAY
  5) MOOD
  6) WORK</p>
  
  <p>I am looking help on </p>
  
  <p>1) How do i insert variables as values in to the database? (<strong>staffid, machine, date_str</strong> are the values i am trying to insert in the database fields <strong>STAFFID, MACHINE, CURRENT_TIME</strong> )</p>
  
  <p>2) How do i insert the radio button values <strong>day_selected, mood_selected and work_selected</strong>  into database fields <strong>DAY, MOOD, WORK</strong></p>
  
  <p>below is my code.</p>
  
  <pre><code>from tkinter import *
  import tkinter.messagebox
  import getpass
  import socket
  from datetime import datetime
  
  root=Tk()
  root.title("Survey")
  root.geometry("225x225")
  root.config(bg="antique white")
  root.resizable(width="false", height="false")
  
  
  day_selected = IntVar()
  mood_selected = IntVar()
  work_selected = IntVar()
  
  # creating values for entry
  
  staffid = getpass.getuser()
  machine = socket.gethostname()
  now = datetime.now()
  date_str = now.strftime("%Y/%m/%d %H:%M:%S")
  day_sel = day_selected.get()
  
  def done():
      print(staffid)
      print(machine)
      print(date_str)
      print(day_sel)
      print("Good" if day_selected.get()==1 else "BAD")
      print("Good" if mood_selected.get()==3 else "BAD")
      print("Good" if work_selected.get()==5 else "BAD")
      dsn_tns = cx_Oracle.makedsn('server', 'port', service_name='XXXX.XX.XXXX')
      conn = cx_Oracle.connect(user=r'XXXX', password='XXXX', dsn=dsn_tns)
      cur = conn.cursor()
      cur.execute("INSERT INTO SURVEY (STAFF_ID, HOST_NAME, CURRENT_TIME, DAY, MOOD, WORK) VALUES (%s, %s, %s, %s, %s, %s)",
                  (staffid, machine))
      conn.commit()
      cur.close()
      conn.close()
      tkinter.messagebox.showinfo("Thank you", "Thank you for completing the survey !!!")
  
  lab1 = Label(root, text="  How Was ?", font=("calibri", 20, "bold"), bg="antique white", fg="brown").pack()
  lab2 = Label(root, text="Day", font=("calibri", 14, "bold"),bg="antique white")
  lab2.place(x=8, y=50)
  r1=Radiobutton(root,text="Good", font=("calibri",12), variable=day_selected, value=1,bg="antique white").place(x=110,y=52)
  r2=Radiobutton(root,text="Bad",font=("calibri",12), variable=day_selected, value=2,bg="antique white").place(x=170,y=52)
  lab3 = Label(root, text="Mood", font=("calibri", 14, "bold"),bg="antique white")
  lab3.place(x=8, y=100)
  r3=Radiobutton(root,text="Good", font=("calibri",12), variable=mood_selected, value=3,bg="antique white").place(x=110,y=102)
  r4=Radiobutton(root,text="Bad",font=("calibri",12), variable=mood_selected, value=4,bg="antique white").place(x=170,y=102)
  lab4 = Label(root, text="Work", font=("calibri", 14, "bold"),bg="antique white")
  lab4.place(x=8, y=150)
  r5=Radiobutton(root,text="Good", font=("calibri",12), variable=work_selected, value=5,bg="antique white").place(x=110,y=152)
  r6=Radiobutton(root,text="Bad",font=("calibri",12), variable=work_selected, value=6,bg="antique white").place(x=170,y=152)
  
  sub_bt=Button(root, text="Submit",font=("calibri",12, "bold"), command=done, bg="brown", fg="white").pack(side=BOTTOM)
  
  root.mainloop()
  </code></pre>