title: why if statement doesn't work?
body: <p>I have this php code:</p>
  
  <pre><code>$flag = 0;
  $f = fopen("1.txt", "r");
  while (!feof($f))
  {
      $a = fgets($f);
      $b = explode(",", $a);
      if ($_POST['username'] == $b[0]&amp;&amp; $_POST['password'] == $b[1])
      {
          $flag = 1;
          echo ("Correct");
          break;
      }
  }
   if ($flag == 0)
       echo ("Incorrect");
  fclose($f);
  </code></pre>
  
  <p>and <code>1.txt</code> file is this:</p>
  
  <pre><code>1,1
  2,2
  3,3
  4,4
  5,5
  </code></pre>
  
  <p>I send data to my php page that have <strong>just</strong> this code but I always get <code>Incorrect</code>. I don't know why if doesn't work!(I checked the <code>$_POST['username']</code> and <code>$_POST['password']</code> but all were correct!) can anybody help me? </p>