ik heb een probleem met mijn mysqli query, het probleem is dat alle andere query's het wel doen, en dat deze:
PHP
function check_login ()
{
if( !empty( $_COOKIE[ 'uid' ] ) && !empty( $_COOKIE[ 'hash' ] ) )
{
if( preg_match( '/^[A-Fa-f0-9]{32}$/', $_COOKIE[ 'hash' ] ) && ctype_digit( $_COOKIE[ 'uid' ] ) )
{
if (!$uMysql = mysqli_query($mysqli, 'SELECT * FROM `users` WHERE `id` = "' . intval( $_COOKIE[ 'uid' ] ) . '" AND `hash` = "' . addslashes( $_COOKIE[ 'hash' ] ) . '" AND `ipadres` = "' . $_SERVER[ 'REMOTE_ADDR' ] . '"' ))
{
$error = ' Errormessage: ' . mysqli_error($mysqli);
}
if( mysqli_num_rows( $uMysql ) == 1 )
Toon Meer
het niet doet, ik zie er niks fout aan en dit komt er toch echt uit:
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in xxx/config.php on line 79
Warning: mysqli_error() expects parameter 1 to be mysqli, null given in xxx/config.php on line 81
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in xxx/config.php on line 83
als iemand me er mee kan helpen zou ik daar heel blij met zijn. Thx in advance