Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/05/2003, 14:01
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Esto no me trabaja

Tengo la siguiente página que me permite logearme
Código PHP:
<?php
echo "<html><head><title>Login de Usuarios</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head>
<style type=\"text/css\">
    body{
    scrollbar-face-color: #aaaaaa; 
    scrollbar-highlight-color: #aaaaaa; 
    scrollbar-shadow-color: #aaaaaa; 
    scrollbar-3dlight-color: #eeeeee;
    scrollbar-arrow-color: #000000; 
    scrollbar-track-color: #e3e3e3; 
    scrollbar-darkshadow-color: #000000;
    }

TD { font-family: Tahoma; font-size: 11px; }

TH { font-family: Tahoma; font-size: 13px; }

TEXTAREA { border-bottom-width: 1px; border-color: #000000; border-left-width: 1px;
border-right-width: 1px; border-style: solid; border-top-width: 1px; font-family: Tahoma;
font-size: 10px; font-weight: bold; text-indent: 2px; }

INPUT { border-bottom-width: 1px; border-color: #000000; border-left-width: 1px;
border-right-width: 1px; border-top-width: 1px; color: #000000; font-family: Tahoma; 
font-size: 10px; font-weight: normal; text-indent: 2px; }

SELECT { background-color: #DFF4FF; font-family: Tahoma; font-size: 10px;
font-weight: bold; }

A:link { background-color: transparent; color: #215D83;
font-family: Tahoma; font-size: 11px; text-decoration: none; }

A:visited { background-color: transparent; color:  
</style>
<body background=\"img/back.gif\" topmargin=\"0\" leftmargin=\"0\" align = \"center\"> 
<td><table width=\"85%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
        <tr> 
          <td> <div align=\"left\"><img src=\"img/loginusuarios.gif\" width=\"653\" height=\"132\"></div></td>
        </tr>
        <tr>
          <td>
<table width=\"85%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
              <tr> 
                <td><blockquote><form name=\"form\" method=\"post\" action=\"checkuser.php\">
                  <table><tr><td><p>&nbsp;</p></td></tr></table>
                  <table><tr><td><p>&nbsp;</p></td></tr></table>
                  <table><tr><td><p>&nbsp;</p></td></tr></table>
                  <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
                    <tr> 
                      <td width=\"17%\">Login(*):</td>
                      <td width=\"89%\"><input name=\"login\" type=\"text\" size=\"25\" maxlength=\"25\"></td>
                    </tr>
                    <tr> 
                      <td>Password(*):</td>
                      <td><input name=\"password\" type=\"password\" size=\"25\" maxlength=\"25\"></td>
                    </tr>
                    <tr> 
                      <td colspan=\"2\"><input name=\"enviar\" type=\"submit\" value=\"Entrar ...\"></td>
                    </tr>
                  </table>
                </form>&nbsp;</blockquote></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>"
;
?>
y esta otra que es el checkuser.php
Código PHP:
<?php
 $link 
mysql_connect("localhost","","");
 
$consult mysql_query("SELECT  * FROM registro WHERE login ='$login' AND password='$password'");
 
$count mysql_num_rows($consult);
 if (!
mysql_num_rows($consult))
  { 
   echo 
"<font face=\"Tahoma\" size=\"2\">Nombre de usuario no válido. Debes registrate antes de logearte</font>";
   
mysql_close();
  } 
 else
  {
   
mysql_close();
   echo 
"Ahora sí";
   
header("Location:[url]http://localhost/registro/upload.php[/url]");
   exit();
  } 
?>
pero cada vez que trato de hacer login me da esto como resultado
Nombre de usuario no válido. Debes registrate antes de logearte
¿por qué?
__________________
Ing. Reynier Pérez Mira