Good morning, when inserting a form with PHP if you insert the records in the database but it sends me the following WARNINGS:
Warning: Variable parameter 1 not passed by reference (prefaced with an &). Variable parameters passed to sqlsrv_prepare or sqlsrv_query should be passed by reference, not by value. For more information, see sqlsrv_prepare or sqlsrv_query in the API Reference section of the product documentation in C: \ xampp \ htdocs \ sana_php \ registry.php on line 69
Warning: Variable parameter 2 not passed by reference (prefaced with an &). Variable parameters passed to sqlsrv_prepare or sqlsrv_query should be passed by reference, not by value. For more information, see sqlsrv_prepare or sqlsrv_query in the API Reference section of the product documentation in C: \ xampp \ htdocs \ sana_php \ registry.php on line 69
Warning: Variable parameter 3 not passed by reference (prefaced with an &). Variable parameters passed to sqlsrv_prepare or sqlsrv_query should be passed by reference, not by value. For more information, see sqlsrv_prepare or sqlsrv_query in the API Reference section of the product documentation in C: \ xampp \ htdocs \ sana_php \ registry.php on line 69
Warning: Variable parameter 4 not passed by reference (prefaced with an &). Variable parameters passed to sqlsrv_prepare or sqlsrv_query should be passed by reference, not by value. For more information, see sqlsrv_prepare or sqlsrv_query in the API Reference section of the product documentation in C: \ xampp \ htdocs \ sana_php \ registry.php on line 69
The code I use is the following '
if ($errores == '') {
$query=('INSERT INTO t_usuarios(nombre, usuario, correo, password) VALUES (?,?,?,?)');
$statement=sqlsrv_prepare($conn, $query, array($nombre, $usuario, $mail, $pass));
$resultado=sqlsrv_execute($statement);
}
And the values I pass are those shown below:
$nombre=filter_var(strtolower($_POST['nombre']), FILTER_SANITIZE_STRING);
$usuario=filter_var(strtolower($_POST['usuario']), FILTER_SANITIZE_STRING);
#$usuario='gspindolab';
$mail=strtolower($_POST['mail']);
$pass=$_POST['pass'];
$pass2=$_POST['pass2'];