title: Something wrong with my php search code
body: <p>I am not sure what is going wrong with my code. I am getting message "Page isn't working" not sure why ? I am trying to fetch details of filter on "retrieve1.php" but each time i try to click on student filter i am getting a message saying "Page isn't working". I would appreciate any help here.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
   echo "&lt;body style='background-color:#DCDCDC'&gt;";
  
  include ("account.php");
  ( $db = mysql_connect( $hostname, $username, $password ))
      or die ( "unable to connect to MYSQL database" );
  mysql_select_db( $project );
  
  
  
  $sql= "SELECT * FROM bpi_registration LEFT JOIN 
  bpi_schoolInfo on bpi_registration.id_school = bpi_schoolInfo.id_school";
       
  
  $query=mysql_query($sql) or die(mysql_error());
  
  
  
  function grade()
  {
   $query= "select distinct class_name from bpi_classInfo";
   $result=mysql_query($query) or  die(mysql_error());
    
    
   while  ($value = mysql_fetch_array ($result))
   {
   echo "&lt;option value='" . $value['class_name'] . "'&gt;" . $value['class_name'] . "&lt;/option&gt;";
   }
  
  
  }
  
  
  
  function school()
  {
   $query= "select distinct school_name from bpi_schoolInfo";
   $result=mysql_query($query)or  die(mysql_error());
    
    
   while  ($value = mysql_fetch_array ($result))
   {
    echo "&lt;option value='" . $value['school_name'] . "'&gt;" . $value['school_name'] . "&lt;/option&gt;";
   }
  
  
  }
  
  
  
  
  function team()
  {
   $query= "select distinct team_name from bpi_teamProfile";
   $result=mysql_query($query)or  die(mysql_error());
    
    
   while  ($value = mysql_fetch_array ($result))
   {
    echo "&lt;option value='" . $value['team_name'] . "'&gt;" . $value['team_name'] . "&lt;/option&gt;";
   }
  
  
  }
  
  
  
  function students()
  {
   $query= "select * from bpi_registration";
   $result=mysql_query($query)or  die(mysql_error());
    
    
   while  ($value = mysql_fetch_array ($result))
   {
    echo "&lt;option value='" . $value['first_name'].' '.$value['last_name']. "'&gt;" . $value['first_name'].' '.$value['last_name']. "&lt;/option&gt;";
    
   }
  
  
  }
  
  
  ?&gt;
  
  
  
  &lt;form action="retrieve1.php" method="GET"&gt;
  
  &lt;select name="Grade"&gt;
  &lt;option value="" selected="selected"&gt;Choose Grade&lt;/option&gt;
  &lt;?php grade() ?&gt;
  &lt;/select&gt;
  
  &lt;select name="School"&gt;
  &lt;option value="" selected="selected"&gt;Choose School&lt;/option&gt;
  &lt;?php school() ?&gt;
  &lt;/select&gt;
  
  &lt;select name="Team"&gt;
  &lt;option value="" selected="selected"&gt;Choose Team&lt;/option&gt;
  &lt;?php team() ?&gt;
  &lt;/select&gt;
  
  &lt;select name="Students"&gt;
  &lt;option value="" selected="selected"&gt;Choose Students&lt;/option&gt;
  &lt;?php students() ?&gt;
  &lt;/select&gt;
  
  &lt;input type="submit" value="Find" /&gt;
  &lt;/form&gt;
  
  
  
  &lt;table width="600" border="2"&gt;  
  &lt;tr&gt;  
  &lt;th width="91"&gt; &lt;div align="center"&gt;First Name &lt;/div&gt;&lt;/th&gt;  
  &lt;th width="98"&gt; &lt;div align="center"&gt;Last Name &lt;/div&gt;&lt;/th&gt;  
  &lt;th width="198"&gt; &lt;div align="center"&gt;Email &lt;/div&gt;&lt;/th&gt;  
  &lt;th width="97"&gt; &lt;div align="center"&gt;City &lt;/div&gt;&lt;/th&gt;  
  &lt;th width="97"&gt; &lt;div align="center"&gt;State &lt;/div&gt;&lt;/th&gt;  
  &lt;th width="59"&gt; &lt;div align="center"&gt;Country &lt;/div&gt;&lt;/th&gt;   
  &lt;th width="59"&gt; &lt;div align="center"&gt;View &lt;/div&gt;&lt;/th&gt;   
  
  
  &lt;tr&gt;
  
  &lt;?php
  if (isset($_GET['Students']))
  {
  while ($row=mysql_fetch_array($query))
  { 
  
  
      echo $row['email'];
      echo $row['address_city'];
      echo $row['address_state'];
      echo $row['address_country'];
    
  
    }
  
  
  
  
  }
  
  
  ?&gt;</code></pre>
  </div>
  </div>
  </p>