title: php and search function error
body: <p>i am creating a search function or process to select from the database and display data in a listdropbox for the selection of countries that are already exist in the MySQL database   but i got an error and i do not know how to fix it can anyone help me i am new to php. the error is ( <strong>Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Unnamed Site 2\resources\searchForm.php on line 36</strong>)</p>
  
  <h1>search.php</h1>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Search page&lt;/title&gt;
  &lt;link href="style/stylesheet.css" rel="stylesheet" type="text/css" /&gt;
  &lt;style type="text/css"&gt;
  .searchtitle {
      text-align: center;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;!--&lt;?php require_once('header.php'); ?&gt;--&gt;
  &lt;table width="80%" height="432"&gt;
    &lt;tr&gt;
      &lt;td width="14%" valign="top"&gt;&lt;!--&lt;?php require_once('leftsideBar.php'); ?&gt;--&gt;
  &lt;/td&gt;
      &lt;td width="86%" valign="top"&gt;&lt;h2 class="searchtitle"&gt;Search Types&lt;/h2&gt;
        &lt;table width="95%" height="94"&gt;
        &lt;form action="searchProcess.php" method="post" id="searchForm"&gt;
  
          &lt;tr&gt;
            &lt;td width="20%"&gt;&lt;label for="searchByName2"&gt;By Name&lt;/label&gt;
              &lt;select name="searchByName" id="searchByName2"&gt;
              &lt;/select&gt;&lt;/td&gt;
            &lt;td width="20%"&gt;&lt;label for="searchByCountry"&gt;By Country&lt;/label&gt;
              &lt;select name="searchByCountry" id="searchByCountry"&gt;
               &lt;option id="0"&gt;--select your country--&lt;/option&gt;
               &lt;?php
                 require_once('Connections/connfor_lamelchameltest.php'); 
  
                 $getallCountries = mysql_query("SELECT * FROM country");
                 while($viewallCountries = mysql_fetch_array($getallCountries)){
  
                  ?&gt;
  
                 &lt;option id="&lt;?php echo $viewallCountries['country_id']; ?&gt; "&gt;&lt;?php echo $viewallCountries['country_name'] ?&gt;&lt;/option&gt;
                   &lt;?php } ?&gt;
  
              &lt;/select&gt;&lt;/td&gt;
            &lt;td width="25%"&gt;&lt;label for="searchByGovernorate"&gt;By Governorate&lt;/label&gt;
              &lt;select name="searchByGovernorate" id="searchByGovernorate"&gt;
              &lt;/select&gt;&lt;/td&gt;
            &lt;td width="15%"&gt;&lt;label for="searchByCity"&gt;By City&lt;/label&gt;
              &lt;select name="searchByCity" id="searchByCity"&gt;
              &lt;/select&gt;&lt;/td&gt;
            &lt;td width="20%"&gt;&lt;label for="searchBySpecialization"&gt;By Specialization&lt;/label&gt;
              &lt;select name="searchBySpecialization" id="searchBySpecialization"&gt;
              &lt;/select&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;/form&gt;
        &lt;/table&gt;
  
    &lt;/tr&gt;
  &lt;/table&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h1>connfor_lamelchameltest.php</h1>
  
  <pre><code>&lt;?php
  $hostname_conn = "localhost";
  $database_conn = "lam_el_chamel_db";
  $username_conn = "root";
  $password_conn = ".....";
  $conn = mysql_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR); 
  ?&gt;
  </code></pre>
  
  <p>i add my connfig file</p>