cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Question on submiting a POST form

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Sat, 20 Dec 2008 08:24:29 -0600

On Fri, Dec 19, 2008 at 11:18 PM, Q Zhu <zhuq1_at_yahoo.com> wrote:

> Hi,
>
> I am having some trouble figuring out how to submit to a POST form that
> requires one to click a "submit' button. The HTML source for the submit
> button part looks like this:
>
> <INPUT type=submit value=Submit class="goInputHome">
>
> This is not quite the same as in the curl tutorial on this subject, where
> their 'typical' submit button is coded in the html source like:
>
> <INPUT name=ding value="submit">
>
> where one could use the -d option with "ding=submit" to submit the form.
> But with the above type of submit button, I can't seem to figure out how to
> do it with the -d option because there's no 'name' tag.
>

In my experience, any input field with no name is discarded - it just
doesn't get sent. The reason for having it would simply be to put a button
on the page that triggers the submit cycle. If the server cared about the
value of the submit button, there would be a name.

Ralph Mitchell

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-20