Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/05/2003, 20:46
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
Y este otro tampoco me funciona?

Este es el de logearse:
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>
<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 este es el checkuser.php
Código PHP:
<?php
 $link 
mysql_connect("localhost","","");
 
$consult "SELECT  * FROM registro WHERE login ='$login'";
 
$result mysql_query($consult);
 if(
$row mysql_fetch_array($result)){
    if (
$row['password'] == $password)) { 
        echo 
"Ahora sí";
        
header("Location:upload.php");
        exit();
    } else {
        echo 
"<font face=\"Tahoma\" size=\"2\">Contraseña inválida.</font>";
    }
} else {
    echo 
"<font face=\"Tahoma\" size=\"2\">Nombre de usuario no válido.</font>&nbsp;" mysql_error();
}
mysql_close();
?>
__________________
Ing. Reynier Pérez Mira