title: If variable equals value php
body: <p>I am trying to do a check before the data inserts into the MySQL query.
  Here is the code;</p>
  
  <pre><code>$userid = ($vbulletin-&gt;userinfo['userid']);
  $sql3 = mysql_query("SELECT * FROM table WHERE ID='$_POST[hiddenID]'");
  
  while ($row = mysql_fetch_array($sql3)){
  
  $toon = $row['toonname'];
  $laff = $row['tlaff'];
  $type = $row['ttype'];
  
  if ($type == 1){
  $type == "Bear";
  } elseif ($type == 2){
  $type == "Cat";
  } elseif ($type == 3){
  $type == "Dog";
  }            
  
  }
  </code></pre>
  
  <p>However, this isn't working.
  Basically, there are different values in the 'table' for each type.  1 means Bear, 2 means Cat, and 3 means Dog.</p>
  
  <p>Thanks to whomever can help see a problem in my script!</p>