i am getting the following error for code given below
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\enosha\bit\verify.php on line 26
can you pl check it for me.
tahnks a lot
shane
------------------------
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Index No</title>
</head>
<body>
<?
$conn=mysql_connect("localhost","","");
mysql_select_db("bitweb",$conn);
$rst=$rst_query=mysql_query(("SELECT * FROM students where [indexno] = '.trim($_POST[indexno]).'"),$conn);
$rst_BOF=1;
$rst=mysql_fetch_array($rst_query);
$rst1=$rst1_query=mysql_query(("select * from yearComment where [index] = '".trim($_POST["indexno"])."'"),$conn);
$rst1_BOF=1;
$rst1=mysql_fetch_array($rst1_query);
if (!($rst==0) && !($rst_BOF==1))
{
if (trim(strtoupper($_POST["pass"]))==strtoupper($rst["nicno"]))
{
?>
<BR>
PLEASE VERIFY YOUR INDEX NO <BR>
---------------------------------------- <BR>
<BR>
<table border="0" width="450" cellpadding="0" cellspacing="0">
<tr>
<td width="112">
Index No : </td>
<td width="86"><b><? echo $rst["indexno"];?></b></td>
<td width="82"></td>
</tr>
<tr>
<td width="112">
Name :</td>
<td width="86"><B><? echo $rst["fname"];?></B></td>
</tr>
</table>
<? $_SESSION['indexno']=$rst["indexno"];
?>
<? if (!($rst1==0) && !($rst1_BOF==1))
{
?>
<? $_SESSION['result']=$rst1["comment"];
?>
<? }
else
{
?>
<? $_SESSION['result']=" ";
?>
<? } ?>
<p><a href="results.php">Results
<?
}
//up
//elseif (trim(strtoupper($_POST["indexno"]))=="admin") AND (trim(strtoupper($_POST["indexno"]))=="123")
// {
// Enterresults.htm;
// }
else
{
print "Please check your Password and your indexNo <BR>";
}
}
//up
else
{
print "Please check your Password and your indexNo <BR>";
}
$conn=null;
?>
</a>
</p>
</body>
</html>