title: Comparing values in a database with PHP
body: <p>I was wondering how I could compare a value/varchar in my database to a string in my own PHP script. Below is a picture of my database if it helps and I just want to compare the value inside the ThunderOrNot column (ID = 1) to a string of "Thunder". Neither of my bottom 2 'if' statements work. What am I doing wrong? Thanks!
  <a href="https://i.stack.imgur.com/OGeW9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OGeW9.png" alt="Picture of DB"></a></p>
  
  <pre><code>    &lt;?php
  
  $link = mysqli_connect('.....', '.....', '.....', '.....');
  
  $query = "select * from thunderDemo";
  $result = mysqli_query($link, $query);
  
  while($row = mysqli_fetch_array($result))
  {
           echo $row["ThunderOrNot"];
  }
  
  if($row[ThunderOrNot] == 'Thunder')
  {
           echo "The Value equals Thunder";
  }
  
  if($row == 'Thunder')
  {
           echo "The Value equals Thunder";
  }
  
  mysqli_close($link);
  
  ?&gt;
  </code></pre>