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>» Admin</label>
<?php }
}else{
$_SESSION['permisos']="0"; ?>
<label>» Usuario</label>
<?php } ?>
</form>
</body>
</html>
Después del condicional te dice que hay un error:
<?php print "Login o Password Incorrecto"; ?>