I have this variables :
$cliente = mysqli_real_escape_string($conn, htmlentities($_GET["cliente"]));
$metatickt = mysqli_real_escape_string($conn, htmlentities($_GET["metatickt"]));
$metaext = mysqli_real_escape_string($conn, htmlentities($_GET["metaext"]));
$metaenc = mysqli_real_escape_string($conn, htmlentities($_GET["metaenc"]));
$uf = mysqli_real_escape_string($conn, htmlentities($_GET["estado"]));
And I'm trying to do this query :
$queryInst = "INSERT meta_control (mes,cliente,meta_exit,meta_tickt,meta_enc,uf)"
. " VALUES (MONTH(NOW()),'" . $cliente . "','" . $metaext . "','" . $metatickt . "','" . $metaenc . "','" . $uf . "')";
mysqli_query($conn, $queryInst);
But when I check my db the only column that is not NULL is mes. What could be the cause to this?
var_dump()the values before running, for instance$ufand see what it is showing? I would assume it's the values as "mes" is the only one your not pushing variables through too.mesis the only value that gets inserted correctly, and is the only value you don't grab fromhtmlentities, your$_GETvalues must be messing up somehow.$_POSTinstead of$_GET.