Forum Moderators: coopster
I need to then have it send the same variables to a third-party script that will only accept POST variables, so the get method is out of the question.
Is there a way to do this?
Sorry if it's completely easy, I'm pretty much a noob.
$URL="www.theurl.com/script.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://$URL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "email=$emailaddress&firstname=$firstname&lastname=$lastname");curl_exec ($ch);
curl_close ($ch); But when I do it, I get the following error message:
Parse error: parse error, unexpected T_STRING in /home/msilber/public_html/mailform.php on line 4
Line 4 is: curl_setopt($ch, CURLOPT_URL,"https://$URL");
I can't figure out what's wrong here. Anybody know?