473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Urgently need help

1
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 :&nbsp; </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>
Sep 22 '06 #1
1 1176
ronverdonk
4,258 Expert 4TB
Maybe you would get more attention if you would structure your code within PHP../PHP tags, as specified in the REPLY GUIDELINES! That is what these tags are for.
[PHP]<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 :&nbsp; </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>
[/PHP]

Ronald :cool:
Sep 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Zeeshan | last post by:
Hi Everybody, I want to search the filename recursively for "this is the code original" using linux command grep or ls or any other Result should be as follows: FilenamePath and Linenumber in...
0
by: Kamliesh Nadar | last post by:
Hi I am developing a software using VB.NET I am facing following problems - 1. Though I have placed the NotifyIcon control on the window service application, after starting the service I am...
1
by: Dhiraj | last post by:
hello, everybody, this is Dhiraj here. I need help urgently, as i am getting error on my web page. The error is "Microsoft JET Database Engine error '80004005'" whenever i want to open links of...
5
by: el prinCipante | last post by:
I'm getting tired of the following error message. Compiler Error message : Error: Need explicit cast to convert from: float to: float * I am trying to use a routine from the Numerical Recipes...
1
by: net4matrimonials | last post by:
I m using session veriables of asp.net on two websites www.net4professionals.com(job site) and www.net4matrimonials.com (bride/groom service) when i create a session on page A i use codeing...
1
by: anil | last post by:
hello all i am anil kumar, pursuing master's degree in Computer applications . now i have got some opensource project. that is related to USB sniffing. tha t is snoopypro. Actalluy this is...
4
by: Joonshik Kim | last post by:
I was trying to define 3d array with pointer to pointer. I wrote like following. int ***d; nx = 3; ny = 5; nz = 4; d = (int ***)malloc((int) nx*sizeof(int **)); *d = (int **)malloc((int)...
0
by: efix | last post by:
hey there i need help urgently.. neone hu cud help me?? U c i m tryin t figure out how to program a vb .exe to login into a internet account inreal time. i m playin an online game....
2
by: rkarthik | last post by:
Hello vectors, I am a beginner in vb.net programming and a student. As my final year project I wish to develop a compression tool.Is there any way to impleiment Huffman's compression algorithm in...
16
by: techystud | last post by:
Hi, I am doing a Left Join between two views wherein the column used in the ON condition has empty string rows in the first view. while running the query the application flashes, shows #ERROR...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.