This my error massage :
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test\loginproc.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\loginproc.php:16) in C:\xampp\htdocs\test\loginproc.php on line 24
========================================================================================================
<?php require_once('Connections/kgcrmis.php'); ?>
<?php
// Inialize session
session_start();
// Retrieve username and password from database according to user's input
$login = mysql_query("SELECT * FROM admin WHERE (name = '" . mysql_real_escape_string($_POST['name']) . "')
and (password = '" . mysql_real_escape_string($_POST['password']) . "')");
$ked10014_kgcrmis = mysql_query("SELECT name,password FROM admin WHERE (name = '" . mysql_real_escape_string($_POST['name']) . "')
and (password = '" . mysql_real_escape_string($_POST['password']) . "')");
// Check username and password match
if (mysql_num_rows($login)) { ***<--- Error at this line ***
// Set username session variable
$_SESSION['name'] = $_POST['name'];
// Jump to secured page
header('Location: form1.php');
}
else {
// Jump to login page
header('Location: index.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login Process</title>
</head>
<body>
</body>
</html>