el codigo que me sale en la pagina dice:
Warning: mysql_num_rows() expects parameter 1 to be resource
el codigo es:
Código PHP:
<?
if(isset($_GET['login'])){
if(isset($_POST['username']) && isset($_POST['password'])){
$username = secure($_POST['username']);
$password = secure($_POST['password']);
$password = md5($password);
$login = mysql_query("SELECT * FROM admin WHERE username = '$username'");
$check = mysql_num_rows($login);
if($check>1){
$login = mysql_fetch_array($login);
if($password == $login['password']){
$_SESSION['id'] = $login['id'];
$_SESSION['password'] = $login['password'];
?>