Ver Mensaje Individual
  #10 (permalink)  
Antiguo 04/09/2010, 12:21
markmb
 
Fecha de Ingreso: octubre-2009
Ubicación: En el ordenador
Mensajes: 504
Antigüedad: 14 años, 6 meses
Puntos: 10
Respuesta: redireccionar a otra pagina con sistema login

Todo el html es lo que te provoca el error.
Prueba así:

Código PHP:
<?php
mysql_connect
('localhost','usuario'"unknown");
mysql_select_db('automoviles');
$usuario strtolower($_POST["usuario"]);
    
$password $_POST["password"];
if(
$usuario!= "" && $password!= "")
{
    
$sql mysql_query('SELECT password, usuario FROM administradores WHERE usuario="'.$usuario.'"');
    if(
$fmysql_fetch_array($sql)){
        if(
$f["password"] == $password){
            
$_SESSION["k_username"] = $f['usuario'];
            
header("location:paneldecontrol.php");
            exit();
        
        }else{
            
$mensaje =  'Password incorrecto';
                    }
    }else{
        
$mensaje 'Usuario no existente en la base de datos ';
        
    }
    
}
?>
<!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>Sistema de Placas 2010</title>
<style type="text/css">
<!--
body {
    background-color: #FFF;
    background-image: url(mapa_sp.jpg);
    background-repeat: repeat;
}
-->
</style></head>
<body>
<p><?php echo $mensaje?></p>
<form id="form1" name="form1" method="post" action="">
  <p align="center">&nbsp;</p>
  <p align="center">&nbsp;</p>
  <p align="center">&nbsp;</p>
  <div align="center">
    <table width="305" height="158" border="1">
      <tr bgcolor="#0099CC">
        <td bgcolor="#CCCCCC"><p align="left"><a href="index.php"><img src="REGRESAR.png" width="85" height="57" alt="REGRESAR" /></a></p>
          <p align="center"><img src="usuarios.png" width="56" height="56" alt="usuarios" /></p>
        <h2 align="center"><strong>ADMINISTRADOR</strong></h2></td>
      </tr>
      <tr bgcolor="#0099CC">
        <td><p align="left">&nbsp;</p>
          <p align="center"><strong>USUARIO:</strong>
            <input name="usuario" type="text" id="usuario" size="25" maxlength="25" />
          </p>
          <p align="center"><strong>CONTRASEÑA:</strong>
            <input name="password" type="password" id="password" size="25" maxlength="25" />
          </p>
          <p align="center">
            
          </p>
          <p align="center">&nbsp;</p>
          <p align="center">
           
            <input type="submit" name="boton1" id="boton1" value="INICIAR SESION" />
        </p></td>
      </tr>
    </table>
  </div>
  <p align="center">&nbsp;</p>
</form>
<p>&nbsp;</p>
</body>
</html>
__________________
Buscando ideas para proyectos....

Esperando a tener 18 años....