hey
i seem to get this everytime i run this file within my login script
Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\Isis\login.php on line 16
can anyone help me please?
heres my code
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$login = $_GET['login'];
setcookie("username", "$username", time()+86400);
if ($login=='yes') {
$con = mysql_connect("localhost","root","");
mysql_select_db("obsosuser");
$get = mysql_query("SELECT count(id) FROM obsosuser WHERE username='$username' and password='$password'");
$result = mysql_result($get, 0);
if ($result!=1){
echo "Invalid Login!";
} else
echo "Login Successful! Welcome back ".$_COOKIE['username']." Sir/Maddam." ;
$_SESSION ['username'] = $username;
}
?>
Thanks