Jump to content

php cUrl help please


mdannatt

Recommended Posts

I am trying to use cUrl to send variable $startdate and its value to a new php page. can someone tell me what to change to get it to work please?

$url = "localhost/pod/mypage2.php";

$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL,"http://$URL");

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, "startdate=$startdate");

curl_exec ($ch);   

curl_close ($ch);

 

Link to comment
https://forums.phpfreaks.com/topic/150967-php-curl-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.