i am trying to send POST data to file which must create COOKIE... but it does not. can someone help me?
this is the file with cURL
<?php
print_r($_COOKIE);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/site/test.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_POST,true);
curl_setopt($curl,CURLOPT_POSTFIELDS,"email=$email&name=$name");
$output = curl_exec($ch);
curl_close($ch);
?>
this is the file which must create COOKIE
<?php
setcookie("name", $_POST["name"]);
?>