curl-users
question on POST
Date: Mon, 1 Nov 2010 12:50:01 +0800
Hello all,
I'm very new to curl, so pardon me if this is question is inappropriate etc.
According to:
http://curl.haxx.se/docs/httpscripting.shtml
<form method="POST" action="junk.cgi">
<input type=text name="birthyear">
<input type=submit name=press value="OK">
</form>
And to use curl to post this form with the same data filled in as before, we
could do it like:
curl -d "birthyear=1905&press=OK" www.hotmail.com/when/junk.cgi
However it seems like my case is a bit complex. The form goes like this
<FORM METHOD="POST" action="/cgi-bin/targetRNA/processRequest_2.cgi" ENCTYPE
="application/x-www-form-urlencoded" NAME="form1">
<SELECT NAME = "organism">
<OPTION> </OPTION>
</SELECT>
<input TYPE="text" NAME="mRNA" SIZE="10">
<input TYPE="submit" VALUE="SEARCH">
</FORM>
I need to specify three values in this.
1) The first one is the organism from a dynamically populated list, in the
<SELECT> part. my value for this will always be an organism called
'Burkholderia Pseudomallei'. I have no idea how to do this.
2) Secondly is the mRNA, which isn't a problem since it has a 'name'
3) Thirdly is the submit value, which is a problem since it doesn't have a
'name'
Could anyone give me any pointers how to do this?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-01