Re: How to POST to a page with multiple forms
Date: Fri, 9 Jun 2006 09:37:39 +0200 (CEST)
On Fri, 9 Jun 2006, Nick S. wrote:
> I cannot figure out how to correctly POST to a page with multiple forms
> shown below:
You don't post to the page that holds the HTLM, you post to the URL as pointed
out in the 'action' field within the <form> tag:
> <FORM ACTION="/ssb/prod/twbksrch.P_ShowResults" METHOD="POST">
Posting to this form means posting to "/ssb/prod/twbksrch.P_ShowResults"
> <FORM ACTION="HZSKVTSC.P_ProcRequest" METHOD="POST" CLASS=atted>
... and posting to this should be done to "HZSKVTSC.P_ProcRequest".
> I would like to completely ignore the first form and fill the inputs of the
> second form. This is what I have tried to do, only to receive program
> output saying "MISMATCH, VARIABLES IN FORM NOT IN PROCEDURE: TERMYEAR,
> SUBJ_CODE, CRSE_NUMBER..." all of which are fields of the second form that I
> try to fill using curl_formadd().
curl_formadd() is wrong. As the <form> tags show, these are not multipart
posts but plain normal ones.
Also, using LiveHTTPHeaders would've revealed this to you in no time.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-06-09