title: while ($row=mysql_fetch_array($query)) is not working
body: <p>What i try to do is check the user's Id by verifying in a cookie (called "identification").</p>
  
  <p>thats my code:</p>
  
  <pre><code>if(!$noCookie) {
  
  $sql = "SELECT * FROM `". TABLE_PREFIX ."_logged` WHERE `logged_cookie` = '". $usersCookie ."' LIMIT 1";
  $query = mysql_query($sql) or die(mysql_error());
  if (mysql_num_rows($query) &lt;= 0) {
      echo 'yes cookie';
  
      $row = mysql_fetch_array($query) or die(mysql_error());
      print_r($row);
  
      while ($row=mysql_fetch_array($query)) {
          echo $usersId = $row["logged_user_id"];
      }
  } else {
      echo 'no cookie';
  }
  }
  </code></pre>
  
  <p>What happends is that if the user's cookie is the same one like in the table,
  it will return the user's id.</p>
  
  <p>so thats what im trying to do, the IF says "yes cookie", but inside the while it doesnt do anything!
  and its not giving me an error.</p>