从php中的HTTP POST获取内容

So I am trying to do something I think should be really simple: sending data using an HTTP POST to a simple php script that can take the contained information and do something with it. This information can be either text or image data (binary data), but that is perhaps irrelevant.

I am testing my php script by using hurl.it to send a sample HTTP POST containing two parameters of name and date or something simple like that. I have a small php script on the server end that looks for those variable names.

Here is the php:

<?php
    echo "Some Message";
    $nameValue =  $_POST('name')
    echo $nameValue
    $dateValue =  $_POST('date')
    echo $dateValue
?>

I thought this would work, but I am getting a response stating the following:

Fatal error: Function name must be a string in [volume name]

Does anyone have any suggestions on how to fix this? Thanks in advance for any help!

$_POST is an array. You must do

$_POST['name']
$_POST('name')

This should be

$_POST['name']

$_POST is an array, so you use []. () is for functions.

Also, you need to end lines with ;.

$_POST['name'] not $_POST('name')

also you seem to be missing semicolons.

$_POST is an associative array. So, as for all associative arrays, the proper syntax is

$nameValue = $_POST['name'];

Of course, this means that $_POST['name'] could have been an array itself.