Commit
·
c931402
1
Parent(s):
6836c01
Update app.py
Browse files
app.py
CHANGED
@@ -55,10 +55,10 @@ def main():
|
|
55 |
elif option=="Update":
|
56 |
st.subheader("Update a Record")
|
57 |
name=st.text_input("Enter Name")
|
58 |
-
|
59 |
if st.button("Update"):
|
60 |
sql="update users set email=%s where name=%s"
|
61 |
-
val=(name,
|
62 |
mycursor.execute(sql,val)
|
63 |
mydb.commit()
|
64 |
st.success("Record Updated Successfully!!!")
|
|
|
55 |
elif option=="Update":
|
56 |
st.subheader("Update a Record")
|
57 |
name=st.text_input("Enter Name")
|
58 |
+
new_email=st.text_input("Enter New Email")
|
59 |
if st.button("Update"):
|
60 |
sql="update users set email=%s where name=%s"
|
61 |
+
val=(name,new_email)
|
62 |
mycursor.execute(sql,val)
|
63 |
mydb.commit()
|
64 |
st.success("Record Updated Successfully!!!")
|