查询不起作用

I just transfered my website to another hosting, but some scripts stop working, many very simple as this:

    mysql_query("INSERT INTO orders (userid,cid,tipou,cantidad,factura,producto,lote,notas,cprod,pbase,cenvio,fecha,status,cobro,ip)

VALUES ('{$_SESSION['id_usuario']}','{$cid}','{$tipou}','{$cantidad}','{$factura}','{$producto}','{$numlot}','{$notas}','{$cprod}','{$pbase}','{$cenvio}','{$fecha}','{$status}','{$cobro}','{$ip}')");

Im using php version 5.6, And tryed to enable Error Reporting, but I dont got any warnings, the query don't INSERT any data on the table.

Please apologize my english, and thanks for helping.

This is how i set it up pretty much:

connect.php:

<?php

define('DB_HOSTNAME', 'HOSTNAME');
define('DB_USERNAME', 'USERNAME');
define('DB_PASSWORD', 'PASSWORD');
define('DB_DATABASE', 'DATABASE');

function dataQuery($query, $params) {
$queryType = explode(' ', $query);

// establish database connection
try {
    $dbh = new PDO('mysql:host='.DB_HOSTNAME.';dbname='.DB_DATABASE, DB_USERNAME, DB_PASSWORD);
    $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e) {
    echo $e->getMessage();
    $errorCode = $e->getCode();
}

// run query
try {
    $queryResults = $dbh->prepare($query);
    $queryResults->execute($params);
    if($queryResults != null && 'SELECT' == $queryType[0]) {
        $results = $queryResults->fetchAll(PDO::FETCH_ASSOC);
        return $results;
    }
    $queryResults = null; // first of the two steps to properly close
    $dbh = null; // second step to close the connection
}
catch(PDOException $e) {
    $errorMsg = $e->getMessage();
    echo $errorMsg;
}
}

?>

Then i just use functions to do the work:

<?php

    function functionNameHere() {
        $query = "INSERT INTO orders (userid,cid,tipou,cantidad,factura,producto,lote,notas,cprod,pbase,cenvio,fecha,status,cobro,ip) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        $params = array($_SESSION['id_usuario'],etc...);
        dataQuery($query,$params);
    }

?>

then just call <?php functionNameHere(); ?>

Created this:

$sessid = $_SESSION['id_usuario'];
if (!$mysqli->query("INSERT INTO orders (userid,cid,tipou,cantidad,factura,producto,lote,notas,cprod,pbase,cenvio,fecha,status,cobro,ip)

VALUES ('".$sessid."','".$cid."','".$tipou."','".$cantidad."','".$factura."','".$producto."','".$numlot."','".$notas."','".$cprod."','".$pbase."','".$cenvio."','".$fecha."','".$status."','".$cobro."','".$ip."')")) {
    echo "Falló la Insersión de Datos: (" . $mysqli->errno . ") " . $mysqli->error;
} else {echo"Datos Insertados";}

Working on localhost, but not in my server.