am also getting this error ? Any help would greatly be appreciated.
Thanks
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\Hebahan\selenggaraPengguna.php on line 67
<?php
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpireString = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpireString);
session_start();
if ($_SESSION['nokp'] == NULL)
{
die("Sila log masuk menggunakan skrin utama !!");
}
$idStaf=strtoupper($_SESSION['nokp']);
include("./headerDaerah.php");
require 'dbConnect.php';
$carian = $_POST['carian'];
$ic = $_POST['ic'];
$nama = $_POST['nama'];
?>
<head>
<title>Sistem E-Hebahan</title>
<link rel="stylesheet" href="file:///C|/xampp/htdocs/Hebahan/css/table.css" type="text/css" />
<style type="text/css">
<!--
.style38 {color: #000000}
.style43 {font-size: 12px; font-weight: bold; font-family: tahoma, verdana; }
-->
</style>
</head>
<body>
<?php
if($carian == "All") {
$sql="SELECT * FROM pendaftaran";
$result=mysql_query($sql);
} else if ($carian == "namaSuspek") {
$sql="SELECT * FROM pendaftaran where nama like '%$nama%'";
$result=mysql_query($sql);
} else if ($carian == "KadPengenalan") {
$sql="SELECT * FROM pendaftaran where nokp like '%$ic%'";
$result=mysql_query($sql);
}
?>
<form name="form1" method="post" action="">
<table width="800" height ="33" border="0" align="center" bordercolor="#7D9BE3" bgcolor="#7D9BE3">
<tr>
<th bgcolor="#7D9BE3" scope="row"><span class='tbl_title style38'>SELENGGARA SUSPEK </span></th>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="3" cellspacing="0">
<tr bordercolor="#B6CDFB" bgcolor='#B6CDFB' class="tbl_title">
<td width="37" height="25" align="center"><span class="style43">BIL</span></td>
<td width="189" align="center"><span class="style43">NAMA</span></td>
<td width="173" align="center" bordercolor="#B6CDFB" bgcolor="#B6CDFB"><span class="style43">NAMA GELARAN</span></td>
<td width="137" align="center"><span class="style43">NO IC </span></td>
<td width="99" align="center"><span class="style43">NO REPOT </span></td>
<td colspan="4" align="center"><span class="style43">TINDAKAN</span></td>
</tr>
<?php
$i=1;
while($rows=mysql_fetch_array($result)){ ------> line 67
$namaSuspek = $rows['nama'];
$nokp=$rows['nokp'];
$nokp1= trim ($nokp);
?>
<tr class="tbl_kurCon" bordercolor="#FFFFF2" bgcolor="#FFFFF2">
<td>
<div align="center"> <? echo "$i"; ?></div></td>
<td bordercolor="#FFFFF2" bgcolor="#FFFFF2">
<div align="justify"> <? echo $rows['nama'];?> </div></td>
<td>
<div align="center"><? echo $rows['nama_gelaran']; ?> </div></td>
<td>
<div align="center"><? echo $rows['nokp']; ?></div></td>
<td>
<div align="center"><? echo $rows['repot_no']; ?></div></td>
<td width="129" align="center"><a href="selenggaraSuspek_11.php?&task=update&nokp=<?=$nokp1?>"><img src="img/edit7.bmp" border="0"></a> <a href="deleteSuspek.php?&task=delete&nokp=<?=$nokp1?>" onClick="return confirm('Adakah anda pasti?');" ><img src="img/delete1.bmp" border="0"></a></td>
<? $i++;?>
<? } ?>
</table>
<p> </p>
<p> </p>
</form>
<p> </p>
<?php
mysql_close();
?>
</body>
</html>