Hello there,
I'm having an issue with GetSQLValueString.
It worked before (PHP 5) but now in PHP7 it doesn't. Maybe it is deprecated? (i couldn't find any infos on that).
I'm trying to update a record. Some of the code follows:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form")) {
$updateSQL = sprintf("UPDATE t_cliente SET tipo_client=%s, nome=%s, morada=%s, nif=%s, cod_postal=%s, telemovel=%s, email=%s WHERE ID=%s",
GetSQLValueString($_POST['tipo'], "int"),
GetSQLValueString($_POST['nome'], "text"),
GetSQLValueString($_POST['morada'], "text"),
GetSQLValueString($_POST['nif'], "int"),
GetSQLValueString($_POST['cod'], "text"),
GetSQLValueString($_POST['telefone'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['ID'], "int"));
$Result1 = mysqli_query($con, $updateSQL) or die(mysqli_error());
GetSQLValueString seems to always output NULL and thus the update fails.
Thanks for the help! Note: I updated some functions, like mysql_query to mysqli_query.