im trying so submit a webpage that has checkboxes and i need up to 10 of these checkboxes checked
the problem is when i try to assign them to one name in a dict it only assigns the last one not all 10
so how can i do this here is the request code:
forms = {"_ref_ck": ref,
"type": "create",
"selected_items[]": sel_itms[0],
"selected_items[]": sel_itms[1],
"selected_items[]": sel_itms[2],
"selected_items[]": sel_itms[3],
"selected_items[]": sel_itms[4],
"selected_items[]": sel_itms[5],
"selected_items[]": sel_itms[6],
"selected_items[]": sel_itms[7],
"selected_items[]": sel_itms[8],
"selected_items[]": sel_itms[9]
}
data = urllib.urlencode(forms)
req = urllib2.Request('http://www.neopets.com/island/process_tradingpost.phtml',data)
res = self.opener.open(req)
html = res.read()
this works but i only sends one value for "selected_itmes[]"
when i look at the actual request in a web debugging proxy it sends multiple values for "selected_items[]"
but i dont know how to do it with python
please help Thank you!!