title: php/mysql elseif challenges
body: <p>I am trying two different queries, both of them are working fine separately but i want a situation where one of them will fall in the elseif statement of PHP or if anyone has a better solution.below is the code for the first and second statement.</p>
  
  <p>first statement</p>
  
  <pre><code>$retvval = mysql_query( $sqql);
  $sqql = "SELECT `autoID`, `Name of Doctor`, `Email`, `Hospital of Practise`, `State`,
  `Specialization`, `Professional Organization`, `webpage` FROM `doctor_locator`
  WHERE state = '$states' AND `name of doctor` LIKE 'Dr%'";
  $retvval = mysql_query( $sqql);
  if(! $retvval )
  {
    die('Could not get data: ' . mysql_error());
  }
  
  while($row = mysql_fetch_array($retvval))
  {
   echo "{$row['autoID']}.  "."Name of Doctor: &lt;a href = \"{$row['webpage']}\"&gt;{$row['Name of Doctor']} &lt;/a&gt;&lt;br&gt;"
      ."Email: {$row['Email']} &lt;br&gt;". "Hospital of Practise: {$row['Hospital of Practise']}
      &lt;br&gt;". "State:  {$row['State']} &lt;br&gt;" . "Specialization: {$row['Specialization']} &lt;br&gt; ";
  }
  </code></pre>
  
  <p>second statement</p>
  
  <pre><code>$retval = mysql_query( $sql);
  $sql = "SELECT `autoID`, `Name of Doctor`, `Email`, `Hospital of Practise`, `State`,
  `Specialization`, `Professional Organization`, `webpage` FROM `doctor_locator`
  WHERE state = '$states' AND specialization = '$specialize' ";
   $retval = mysql_query( $sql);
   if(! $retval )
   {
    die('Could not get data: ' . mysql_error());
   }
  
   while($row = mysql_fetch_array($retval))
   {
  echo "{$row['autoID']}.  "."Name of Doctor: &lt;a href = \"{$row['webpage']}"&gt;{$row['Name of Doctor']} &lt;/a&gt;&lt;br&gt;"."Email: {$row['Email']} &lt;br&gt;". "Hospital of Practise:{$row['Hospital of Practise']}&lt;br&gt;". "State:  {$row['State']} &lt;br&gt;" . "Specialization: {$row['Specialization']} &lt;br&gt; ";
  }
  </code></pre>