title: check if text match php mysql (beginner)
body: <p>Sorry for this very beginner question... I have a table like</p>
  
  <pre><code>| id | block_1 | block_2|
  -------------------------
  | 1  | Mark    | John   |
  | 2  | Antony  |        |
  ------------------------- 
  </code></pre>
  
  <p>i want check if text in a cell match my variable for example $name:</p>
  
  <pre><code>...
  $sql = "SELECT * FROM my_table WHERE id='1'";
  $res = mysql_query($sql, $connection);
  $row = mysql_fetch_array($res);
  
  
  $block1 = $row['block_1'];
  $name = 'Mark';
  
  if ($block1 == $name)
  {
  echo 'yes';
  }
  else
  {
  echo 'no';
  }
  </code></pre>
  
  <p>but i think my reasoning is wrong, im beginner... all solutions are welcome</p>