Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\eUTM\login\logincheck.php on line 13

here is the code:

<?php

//login check
require_once("dbconn.php");

$con=connectdb();

$idpengguna=$_POST['idpengguna'];
$katalaluan=$_POST['katalaluan'];

//login PELAJAR from table pelajar
$pekerja_query="SELECT * FROM pengguna where idpengguna = '$idpengguna' AND katalaluan = '$katalaluan'";
$pekerja_result=mysql_query($pekerja_query,$con);
$pekerja_row=mysql_fetch_array($pekerja_result);

if(!$nama_id && !$katalaluan)
{
    $err=1;
    include("../index.php");
}
elseif($nama_id  == $pekerja_row["idpengguna"] && $katalaluan != $pekerja_row["katalaluan"])
{
    $err=2;
    include("../index.php");
}
elseif($pekerja_row["idpengguna"] == $nama_id && $pekerja_row["katalaluan"] == $katalaluan)
{
    session_start();
    $_SESSION['pengguna_id'] = $pekerja_row["pengguna_no_id"];
    header("Location: ../aduan.php?log=1");
}
else
{
    $err=3;
    include("../index.php");
}
?>

thanks for your reply. my problems already solved. thanks again. =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.