How to POST to a page with multiple forms
Date: Fri, 09 Jun 2006 01:34:26 -0400
I'm very new to this, so forgive me if I have missed something in the
I cannot figure out how to correctly POST to a page with multiple forms
<FORM ACTION="/ssb/prod/twbksrch.P_ShowResults" METHOD="POST">
<INPUT TYPE="text" NAME="KEYWRD_IN" SIZE="20" MAXLENGTH="65"
<INPUT TYPE="submit" VALUE="Go">
<FORM ACTION="HZSKVTSC.P_ProcRequest" METHOD="POST" CLASS=atted>
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().
My current code looks something like this:
curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "CAMPUS",
CURLFORM_COPYCONTENTS, "0", CURLFORM_END);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
curl_easy_setopt(curl, CURLOPT_URL, "http://...")
res = curl_easy_perform(curl);
Any help with this would be greatly appreciated.
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ
Received on 2006-06-09