I m trying to figure out how to send multiple fields with AJAX. Would I use a GET or POST?
页: 1 我希望我的田野能够根据在选定盒子中选择的选项进行更新——我知道我已经知道,为了工作,我很想知道,如何通过XMLHttpRequest,发送多种不同的数据。
i.e.
fname = c.execute("""SELECT fname from employees WHERE user = %s;""", (uname))
lname = c.execute("""SELECT lname from employees WHERE user = %s;""", (uname))
email = c.execute("""SELECT email from employees WHERE user = %s;""", (uname))
deptid = c.execute("""SELECT dept_id from employees WHERE user = %s;""", (uname))
active = c.execute("""SELECT active from employees WHERE user = %s;""", (uname))
sentient = c.execute("""SELECT sentient from employees WHERE user = %s;""", (uname))
我将掌握所有这些数据,并希望将其送回我的另一页。 我将如何这样做,以便更新它。
注,我要从服务器上将这一信息发送到客户网页。 一、即,如果用户从客户网页上的选定箱中选择不同的用户名称(此处不显示,将通过POST或GET发送),所有这些领域都将送回我的主页并展示给用户。