Readie - 9:30 pm on Aug 4, 2013 (gmt 0)
Calling the function mysqli_query does not create the variable $mysqli_query.
You're trying to use a variable before you defined it, and PHP being the forgiving language that it is, is allowing it to be interpreted as an empty string for the mysqli_query call you have in your if brackets.
By defined I mean you haven't done this:
If you put error reporting on E_ALL, you would find you would get a message like:
Notice: Undefined variable: mysqli_query in /path/to/file.php on line 19