Please note that I'm calling this page from another page with the following `cURL` code:

```
$chx = curl_init();
    curl_setopt($chx, CURLOPT_URL,"../php/giveactions.php");
    curl_setopt($chx, CURLOPT_POST, 1);
    curl_setopt($chx, CURLOPT_POSTFIELDS, "user=myname&actions=10&addy=DCGyHh6cy46ZYqwyy5PzMYLujLZVoPJVPE");
    curl_setopt($chx, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($chx, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($chx, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($chx, CURLOPT_SSLVERSION,3);
    $server_output = curl_exec($chx);
    curl_close ($chx);

```

I have a PHP function page that houses the following code: 

```
<?
    require('db.php');

    $moreactions = 0;
    $totalActions = 0;

    if (isset($_POST["user"])) {
        $user_id = $_POST["user"];
    }
    if (isset($_POST["actions"])) {
        $moreactions = $_POST["actions"];
    }
    if (isset($_POST["addy"])) {
        $addy = $_POST["addy"];
    }

    $moreactions = round($moreactions / 10);

    $query = "SELECT * FROM `systems` WHERE `name` = '$user_id';" or die(mysql_error());
    $results = mysql_query($query);

    while($row = mysql_fetch_array($results)) {
        $actions = $row["actions"];
    }

    $totalActions = $actions + $moreactions;

    mysql_query("UPDATE `systems` SET actions=" . $totalActions . " WHERE `name` = '".$user_id."';") or die(mysql_error());

    echo "200ok";

    mysql_close();
?>

```

For some reason, I can output `$totalActions` fine (calculates perfectly etc). But **only** using a Rest Post Client, the moment I try it on a web server, it does everything except UPDATE the MySQL row...

I apologise for the vagueness of this question, I will amend based on comments/answers.

Thanks in advance chaps and chappesses

EDIT: Variables echo fine, the MySQL query also echos fine, with all the variables set correctly

EDIT 2: Note that "200ok" is also echoed fine at the end of the file!