php searching empty fields in the db : <p>I'm constructing a good code to check the database and some more things, but i stopped in the line... it says: </p>

<pre><code>notice: Undefined variable: getUserNew in D:\xampp\htdocs\SilverCommunity(1.6.2)\asp\class\giveaway\winner.php on line 134
</code></pre>

<p>My Started code:</p>

<pre><code>         if(isset($_POST['giftID'])) {

            //select user from db.
            $getUserNew = getUser_ID_($db, $id_us);    

            if(!empty($getUserNew)) {

                //if empty, add new ticket.
                newGiveaway($db, $id_us);
                $hide = rand_line("../../codes.txt");
                echo $hide;

            } 
            else 
            {
                    //check dates and return
                    echo "Next step";
            }
 } 
</code></pre>

<p>Function Code to search the user.</p>

<pre><code>            function getUser_ID_($db, $id_us)
        {
            $id_us = $_SESSION['steamid'];
            global $host; $username; $password; $dbname; 

            $sqlu = "SELECT id_steam FROM public_giveaway WHERE id='$id_us'";
            $query = mysqli_query($db, $sqlu);

            while($Qrow = mysqli_fetch_array($query))
            {

                $getUserNew = $Qrow['id_steam'];

            }

            return $getUserNew;

        }   
</code></pre>

<p>maybe i'm blind... but i can't find the error.. maybe is an "', or ;"... Really... i don't know...</p>
