Ver Mensaje Individual
  #10 (permalink)  
Antiguo 22/11/2010, 04:06
Avatar de DiegoAH
DiegoAH
 
Fecha de Ingreso: noviembre-2010
Ubicación: Madrid
Mensajes: 53
Antigüedad: 13 años, 5 meses
Puntos: 0
Respuesta: No entiendo este error

no se por ke estaba asi pero vamos sigue igual y ya no se que hacer vuelvo a dejar el codigo con ese error corregido:
Código HTML:
Ver original
  1.     <head>
  2.     <title>LOGUEO</title>
  3.            
  4.    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5.        <style type:="text/css">
  6.     body {
  7.     font-style:italic;
  8.     margin: 0 auto;
  9.     font-family: arial;
  10.     text-align:center;
  11.     background-color: #F0F0F0;
  12.     vertical-align:center;
  13.     background-image:url(fondo-cabecera.png);
  14.     background-repeat:repeat-x;
  15.         }
  16.        
  17.     #cabecera{
  18.     background-color:#000;
  19.     background-repeat:repeat;
  20.     margin-top:40px;
  21.     margin-bottom:60px
  22.    
  23.    
  24.             }
  25.    
  26.     #tabla1{
  27.     font-weight: bold;
  28.     color: #F0F0F0;
  29.     height:auto;
  30.     width:auto;
  31.     overflow: hidden;
  32.     class="fija";
  33.     font-family: Arial;
  34.     font-size: 20px;
  35.     font-style: normal;
  36.     line-height: normal;
  37.     text-transform: capitalize;
  38.     margin-top:120 px;
  39.  
  40.         }
  41.            
  42.     #general{
  43.             width:960px;
  44.             margin-top:60px;
  45.             margin-left:225px;
  46.                 }
  47.    
  48.          
  49.       p {
  50.          
  51.           font-family: Arial;
  52.           font-size: 12px;
  53.           font-weight:normal;
  54.          
  55.           }
  56.    
  57.      
  58.      
  59.     #barra{
  60.     background-repeat:repeat;
  61.     background-image: url(BARRA-INFERIOR.jpg);
  62.     margin-top:20px;
  63.      }
  64.      
  65.    
  66.     #link{
  67.         margin-top:345px;
  68.         font-family:arial;
  69.          font-size:14px;
  70.          font-weight:bold;
  71.         }
  72.  
  73.    
  74.         </style>
  75.        
  76.      
  77.        
  78. </head>
  79.    
  80.    
  81.  
  82.  
  83.  
  84. <div id="general">
  85.  
  86.   <div id="logoied" align="right"><img src="logo-izq.png" width="127" height="25" alt="buscar" align="left" />
  87.     <img src="logo-ied2.png" width="70" height="32" alt="buscar" />
  88.    
  89.   </div>
  90. <div id="tabla1">
  91.         <div id="" align="center">
  92.                     <p>introduce tus datos </p>
  93.  
  94.     </div>
  95.     <div id="centro">
  96.  
  97.    
  98.     <form name="form_logeo" id="form_logeo" method="POST" action="login.php">
  99.     <table id="tabla1">
  100.        
  101.         <tr>
  102.             <td>Email:</td>
  103.             <td><input type="text" name="email" id="email" maxlength="80" size="15" /></td>
  104.         </tr>
  105.         <tr>
  106.             <td>Contrase&ntilde;a:</td>
  107.             <td>
  108.                 <input type="password" name="pass" id="pass" maxlength="15" size="15" />
  109.             </td>
  110.         </tr>
  111.  
  112.         <input type="hidden" name="aceptar" value="" />
  113.                 <tr><td align="center" colspan="2"><br/><input type="submit" name="aceptar" id="aceptar" value="Continuar"/>    
  114.                 <div align="center"><a href="cerrarsesion.php">cerrar sesion</a></div>
  115. </td></tr>     
  116.     </table>
  117.     </form>
  118.    
  119.    
  120. </div>
  121. <div id="link">
  122.  <a href="mostrar.php">Volver</a></div>
  123.     <div id="barra">
  124.    
  125.     <img src="BARRA-INFERIOR.jpg" width="1" height="2" alt="buscar" />
  126.     </div>
  127.  
  128.     <p align="right"><img src="logoizqabajo.png" width="95" height="15" alt="buscar" align="left"/><img src="logodrchabajo.png" width="61" height="28" alt="buscar" /></p>
  129.   <img src="derechos.png" width="191" height="9" alt="buscar" align="left" style="margin-top:-20px"/>
  130. </div>
  131. </div>
  132.  
  133.  
  134.  
  135. </body>
  136. </html>

Código PHP:
Ver original
  1. <?php
  2. $usuario="root";
  3. $password="";
  4. $bd="admin";
  5. mysql_connect('localhost',$usuario,$password);
  6. mysql_select_db($bd) or die ("No podemos conectar con la Base de datos" );
  7. if(isset($_POST['aceptar'])){
  8. $email=$_POST['email'];
  9. $pass=$_POST['pass'];
  10. $sql = mysql_query("SELECT email FROM administradores where  email='".$email."' and pass='".$pass."'");
  11. $num_filas= mysql_num_rows($sql);
  12. $fila=mysql_fetch_assoc($sql);
  13. if ($num_filas != 0){
  14. $_SESSION['login']="ok";
  15. header ("Location: administracion.php");
  16. }
  17. else{
  18. $error= "ERROR";           
  19. header ("Location: administracion.php");
  20. }  
  21. }
  22. ?>