Seleccione trabajos, Insertar en mysql no se inserta con php

Tengo una tabla como la siguiente

CREATE TABLE IF NOT EXISTS `pictures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `description` varchar(200) NOT NULL,
  `url` varchar(1000) NOT NULL,
  `users_id` bigint(20) NOT NULL,
  `totalvoteup` int(11) NOT NULL,
  `totalvotedown` int(11) NOT NULL,
  `totalvoteneutral` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `users_id` (`users_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 

Puedo insertar los siguientes valores en phpmyadmin con la sentencia sql

INSERT INTO pictures(name, description, url, users_id) VALUES ('try','try','try', 12345)

Así que no hay problema en la base de datos

Pero si uso el siguiente script PHP para seleccionar e insertar interacciones con mi base de datos, no inserta nada en la base de datos

<?php

// Helper method to get a string description for an HTTP status code
// From http://www.gen-x-design.com/archives/create-a-rest-api-with-php/ 
function getStatusCodeMessage($status)
{
    // these could be stored in a .ini file and loaded
    // via parse_ini_file()... however, this will suffice
    // for an example
    $codes = Array(
        100 => 'Continue',
        101 => 'Switching Protocols',
        200 => 'OK',
        201 => 'Created',
        202 => 'Accepted',
        203 => 'Non-Authoritative Information',
        204 => 'No Content',
        205 => 'Reset Content',
        206 => 'Partial Content',
        300 => 'Multiple Choices',
        301 => 'Moved Permanently',
        302 => 'Found',
        303 => 'See Other',
        304 => 'Not Modified',
        305 => 'Use Proxy',
        306 => '(Unused)',
        307 => 'Temporary Redirect',
        400 => 'Bad Request',
        401 => 'Unauthorized',
        402 => 'Payment Required',
        403 => 'Forbidden',
        404 => 'Not Found',
        405 => 'Method Not Allowed',
        406 => 'Not Acceptable',
        407 => 'Proxy Authentication Required',
        408 => 'Request Timeout',
        409 => 'Conflict',
        410 => 'Gone',
        411 => 'Length Required',
        412 => 'Precondition Failed',
        413 => 'Request Entity Too Large',
        414 => 'Request-URI Too Long',
        415 => 'Unsupported Media Type',
        416 => 'Requested Range Not Satisfiable',
        417 => 'Expectation Failed',
        500 => 'Internal Server Error',
        501 => 'Not Implemented',
        502 => 'Bad Gateway',
        503 => 'Service Unavailable',
        504 => 'Gateway Timeout',
        505 => 'HTTP Version Not Supported'
    );

    return (isset($codes[$status])) ? $codes[$status] : '';
}

// Helper method to send a HTTP response code/message
function sendResponse($status = 200, $body = '', $content_type = 'text/html')
{
    $status_header = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);
    header($status_header);
    header('Content-type: ' . $content_type);
    echo $body;
}

class RedeemAPI {

    private $db;

    // Constructor - open DB connection
    function __construct() {
        $this->db = new mysqli('localhost', 'root', 'password', 'testBasParmak');
        $this->db->autocommit(FALSE);
    }

    // Destructor - close DB connection
    function __destruct() {
        $this->db->close();
    }

    // Main method to redeem a code
    function redeem() {

        // Check for required parameters
        if (isset($_POST["users_id"]) && isset($_POST["name"]) && isset($_POST["url"])&& isset($_POST["description"])) {

            // Put parameters into local variables
            $users_id = $_POST["users_id"];
            $name = $_POST["name"];
            $url = $_POST["url"];
            $description=$_POST["description"];



            // insert  i also tried with 'Insert .....' rather then "Insert...."
            $stmt = $this->db->prepare("INSERT INTO pictures(name, description, url, users_id) VALUES (?, ?, ?, ?)");
            $stmt->bind_param("sssi", $name, $description, $url, $users_id);
            $stmt->execute();
            $stmt->close();



            //select
            $stmt = $this->db->prepare('SELECT name, description, url, users_id FROM pictures');
            $stmt->execute();
            $stmt->bind_result($name, $description, $url, $users_id);
            while ($stmt->fetch()) {
                echo "Name of picture is $name url of picture is $url";
            }
            $stmt->close();



            return true;
        }
        sendResponse(400, 'Invalid request');
        return false;

    }

}

// This is the first thing that gets called when this page is loaded
// Creates a new instance of the RedeemAPI class and calls the redeem method
$api = new RedeemAPI;
$api->redeem();

?>

Cuando escribo los siguientes parámetros en la ventana del terminal

curl -F "name=deneme" -F "description=deneme" -F "url=deneme" -F "users_id=705735067" http://website.local/index.php

Como resultado, veo que la selección de imágenes funciona, pero cuando voy a la base de datos y verifico si la nueva fila está ahí, no puedo ver la fila.

¿Qué hay de malo con el script php? ¿Por qué seleccionar funciona mientras que insertar no funciona?

------EDITAR-----------------------

He arreglado la inserción para obtener un mensaje de error

// insert 
            $stmt = $this->db->prepare("INSERT INTO pictures(name, description, url, users_id) VALUES (?, ?, ?, ?)");
            $stmt->bind_param("ssss", $name, $description, $url, $users_id);

            $stmt->execute();

             printf("name: %s\n", $name);
             printf("description: %s\n", $description);
             printf("url: %s\n",  $url);
             printf("usersid: %d\n", $users_id);

             printf("Errormessage: %s\n", $stmt->error);
             $stmt->close();

la salida es

name: deneme
description: deneme
url: deneme
usersid: 705735067
Errormessage: 

Respuestas a la pregunta(2)

Su respuesta a la pregunta