Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá... eu estou com um probleminha... na hora q vou entrar numa área autenticada... dá o seguinte erro...
Warning: Wrong parameter count for mysql_num_rows() in /home/ellos/public_html/admin/index.php on line 21
será q alguém poderia me ajudar...?
o codigo está abaixo
<?session_start();include ("config.php");$dbi = conexao();switch ($op) { case "verifica": verifica($user,$pass); break; default: login();}function verifica($user,$pass) {# $pass = crypt ($pass,"Encriptatudooqueforprecisoagoraparaficarprotegido"); $resultado = mysql_query("select username,password from tb_user where ativo='1' and username='$user' and password='$pass'"); if (mysql_num_rows ($resultado) != 0) { session_start('login'); session_register('login'); montamenu(); } else { echo "<p class=\"titulo\">"._ERROLOGIN."</p> <center><a href=\"index.php\" class=\"link\">"._LOGIN."</a></center>"; }}function login(){?><link href="../css/menuesq.css" rel="stylesheet" type="text/css"><table width="471" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="236"><img src="../imagens/img_logoellos.gif" width="236" height="72"></td> <td width="235" class="tituloForms">Login do Sistema </td> </tr></table><p> </p><form action="index.php" method="post"><table width="230" border="0" align="center" cellpadding="0" cellspacing="0" class="tabBusca"> <tr> <td width="82">Usuário</td> <td width="132" height="25"><input name="user" type="text" class="form" id="user"></td> </tr> <tr> <td>Senha <div align="center"> </div></td> <td height="25"><input name="pass" type="password" class="form" id="pass"></td> </tr></table><table width="230" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="40"> <div align="center"> <input type="hidden" name="op" value="verifica"> <input type="submit" class="botoes" value="OK"> </div></td> </tr></table></form></body></html><?}?>Carregando comentários...