I cannot seem to be able to use the variable into the array. It must be a syntax error.
Please, help me sort this out.
$id=$_POST['eventid'];
$data = array('message' => $id);
$id content is null.
Thanks.
I cannot seem to be able to use the variable into the array. It must be a syntax error.
Please, help me sort this out.
$id=$_POST['eventid'];
$data = array('message' => $id);
$id content is null.
Thanks.
Your coding is nice except the $_POST
value is not getting fetched. I have commented the POST
var just to make sure your code works fine.
<?php
$id='test';//$_POST['eventid'];
$data = array('message' => $id);
print_r($data);//output : Array ( [message] => test )
?>