I have two PHP scripts. One posts a message "Hello" while the other receives it. Currently, the second PHP script receives a _POST['message'] but the contents of that message is empty!
Script One:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'message' => 'Hello'
));
$result = curl_exec($ch);
if($result) {
echo("Successful post");
}
curl_close($ch);
Script Two:
if($_POST['message']) {
echo("received post message");
echo ("message:" . $POST['message']);
Currently script Two prints "received post messagemessage:"
I'm completely flummoxed - from looking at this post, it seems my syntax is correct....