cURL / Mailing Lists / curl-library / Single Mail

curl-library

Trouble using POSTFIELDS

From: preetic <preetic_at_mahiti.org>
Date: Fri, 16 Aug 2002 17:50:57 +0530

Hi all!

Am facing a major problem.Am creating an application that is trying to add
a new course in a site which has date as one of the field values.The date
is stored as a list (eg [2,2,2002]) n then at the database level is
converted in the date format and saved.
My problem is that when i post the data using POSTFIELDS the data is
converted into a string and therefore at the database level the query
which adds the data to the database is not able to identify the date as it
gets a string instead of a list.The data is not added to the database as
result.
The piece of code that does this isas follows:

curl.setopt(pycurl.URL,'http://asd/courseadd')
datadictionary=(asddictionary.infodictionary)#this is the dictionary of
#form field values containin the date in the list
dataupdate=urllib.urlencode(datadictionary)
curl.setopt(pycurl.POST,1)
curl.setopt(pycurl.POSTFIELDS,dataupdate)
curl.perform()

can anyone help me?

Cheers

Preeti

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-08-16