include"coon.php";
$sql="select * from admin where admin_user='$user' and admin_pass='$pass'";
$result=mysql_db_query($dbname,$sql);
$rs=mysql_fetch_array($result);
$admin_id=$rs[admin_id];
$admin_user=$rs[admin_user];
$admin_pass=$rs[admin_pass];
if($result){
echo"admin";
}
มันฟ้องว่า
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\WM\www\test\logincheck.php on line 8
Tag : - - - -
Date :
25 ม.ค. 2551 12:22:22
By :
fog
View :
1242
Reply :
3
No. 1
Guest
table นี้ไม่มีข้อมูลอ่ะ
Date :
25 ม.ค. 2551 13:03:13
By :
อยากตอบ
No. 2
Guest
$user=$_POST[user];
$pass=$_POST[pass];
include"coon.php";
$sql="select * from admin where admin_user='$user' and admin_pass='$pass'";
$result=mysql_db_query($dbname,$sql);
$rs=@mysql_fetch_array($result);
if($rm["admin_id"]=='') {
echo "<font face=MS Sans Serif color=#CC3300>ไม่มีข้อมูล กรุณาตรวจสอบอีกครั้ง!...</font>";
}
$admin_id=$rs[];
$admin_user=$rs[admin_user];
$admin_pass=$rs[admin_pass];