title: mysql_fetch_array() expects parameter 1 to be resource problem
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9481963/warning-mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given">&ldquo;Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given&rdquo; error while trying to create a php shopping cart</a>  </p>
  </blockquote>
  
  
  
  <p>I don't get it, I see no mistakes in this code but there is this error, please help:<br>
  mysql_fetch_array() expects parameter 1 to be resource problem</p>
  
  <pre><code>&lt;?php
  
        $con = mysql_connect("localhost","root","nitoryolai123$%^");
      if (!$con)
        {
        die('Could not connect: ' . mysql_error());
        }
  
      mysql_select_db("school", $con);
         $result = mysql_query("SELECT * FROM student WHERE IDNO=".$_GET['id']);
      ?&gt;     
  
  
                             &lt;?php while ($row = mysql_fetch_array($result)) { ?&gt;             
                                       &lt;table class="a"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#D3D3D3"&gt;
      &lt;tr&gt;
  
      &lt;form name="formcheck" method="get" action="updateact.php" onsubmit="return formCheck(this);"&gt;
      &lt;td&gt;
      &lt;table  border="0" cellpadding="3" cellspacing="1" bgcolor=""&gt;
      &lt;tr&gt;
  
      &lt;td  colspan="16" height="25"  style="background:#5C915C; color:white; border:white 1px solid; text-align: left"&gt;&lt;strong&gt;&lt;font size="2"&gt;Update Students&lt;/td&gt;
  
  
      &lt;tr&gt;
      &lt;td width="30" height="35"&gt;&lt;font size="2"&gt;*I D Number:&lt;/td&gt;
      &lt;td width="30"&gt;&lt;input  name="idnum" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="&lt;?php echo $_GET['id']; ?&gt;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
      &lt;td width="30" height="35"&gt;&lt;font size="2"&gt;*Year:&lt;/td&gt;
      &lt;td width="30"&gt;&lt;input  name="yr" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="&lt;?php echo $row["YEAR"]; ?&gt;"&gt;&lt;/td&gt;
  
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>I'm just trying to load the data in the forms but I don't know why that error appears. What could possibly be the mistake in here?</p>