Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/04/2013, 05:33
sToRaGe
 
Fecha de Ingreso: mayo-2010
Mensajes: 51
Antigüedad: 14 años
Puntos: 0
Respuesta: Error al buscar en la base de datos

En bbdd_conexion.php están los siguientes parámetros:
$server
$database
$dbpass
$dbuser

La base de datos contiene los campos:
id
nick
pass
mail
permisos


El formulario de registro:
Código:
<? session_start();
$permisos=$_SESSION['permisos'];
$loginOK=$_SESSION['loginOK'];
?>
<!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>CXC</title>
</head>

<body>
    <?php 
if($loginOK!="1"){
	$_SESSION['loginOK']=0;
	?>
    <table align="right">
    	<tr style="line-height:12px; text-align:right;">
        	<td>
<form class="miform" action="form_test.php" method="post">
<label>Login:</label><input name="nick" type="text" />
<label>Password:</label><input name="pass" type="password" />
<input class="boton" type="submit" value="Entrar" /> </form>
			</td>
            <td>
<form class="miform"  action="form_reg.php" method="post">
<label> | </label>
<input class="boton" type="submit" value="Registrarse" /> </form> 
			</td>
		</tr>
	</table>
    <?php 
}elseif($loginOK=="1"){?>
<form>
<label><?php echo utf8_encode($_SESSION['nick']); ?></label>
<label><a href="form_logout.php">Cerrar sesión</a></label>
<?php if($_SESSION["permisos"]=="1"){ ?>
	<label>&raquo; Admin</label> 
	<?php	}
	}else{
	$_SESSION['permisos']="0";  ?>
	<label>&raquo; Usuario</label>
	<?php } ?>
</form>


</body>
</html>
Después del condicional te dice que hay un error:
<?php print "Login o Password Incorrecto"; ?>