Hello,
I am trying to find out how CURL to a webpage which has multiple submit buttons on its form and POST data.
I need to be able to select have reached the websites 'process.php' page by having clicked the 'submit' button - there is code to check which button the user clicked and of course different results for each button selected.
On a one button page the following code works fine and the data gets POSTed no problem:
$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, "http://blah.com/process.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "jobid=32997&description=Curl loves me");
curl_exec ($ch);
curl_close ($ch);
This code doesn't indicated which button the user clicked on though...
Thanks for any help.