c++ - update a field value in a form using libcurl -


my situation following:

first time form looks below:

first = yes fileupload = file

since after first time, i'd change first = no

but when below keeps adding first = yes no no no no.....

curl_formadd(&formpost, &lastptr, curlform_copyname, "first", curlform_copycontents, "yes", curlform_end) 

==>

curl_formadd(&formpost, &lastptr, curlform_copyname, "first", curlform_copycontents, "no", curlform_end) 

tia

semantics of curl_formadd add section multipart/formdata http post. every time api invoke lastptr updated point end of form. , subsequent invocation appends data it.

i afraid need start form on again set new value. may want use curl_formfree() cleanup form before rebuilding.


Comments

Popular posts from this blog

400 Bad Request on Apache/PHP AddHandler wrapper -

Add email recipient to all new Trac tickets -

php - Change action and image src url's with jQuery -