Ver Mensaje Individual
  #15 (permalink)  
Antiguo 06/10/2011, 13:30
super_rayo
 
Fecha de Ingreso: abril-2011
Mensajes: 169
Antigüedad: 13 años
Puntos: 4
Respuesta: Problema con un if

Me valdría algo como esto?

Código PHP:
<html>
<head>
// title y demas
</head>
<body>
<?php

$formulario 
FALSE;

include(
"config.php");
$username $_COOKIE['loggedin'];
if (isset(
$_COOKIE['loggedin'])){
    
header("Location: http://www.minimonigotes.com/carpetapremium/members/inicio.php");
}else{
    
$formulario TRUE;
}
?>
// Resto del codigo

<?php

if ($formulario == TRUE){
    echo 
"<form action='entrar2.php' method='post' onsubmit='return validate()'>
              <table width='200' border='0'>
                <tr>
                  <td>Usuario:</td>
                  <td><input type='text' name='username' size='20' /></td>
                </tr>
                <tr>
                  <td>Contraseña:</td>
                  <td><input type='password' name='password' size='20' /></td>
                </tr>
                <tr>
                  <td colspan='2'><input type='submit' value='Acceso' />
                    | <a href='registro.html'>Registrarse ahora</a></td>
                </tr>
              </table>
              <p><a href='reenviar.html'>¿Olvidó su contraseña?</a><br />
              </p>
            </form>"
;
}
?>
</body>
</html>
__________________
MiniMonigotes.com | Juegos flash online gratis - ¡Entra ya!