Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/05/2008, 15:04
mamogo
 
Fecha de Ingreso: febrero-2008
Mensajes: 88
Antigüedad: 16 años, 3 meses
Puntos: 1
Re: Problemas con header

hola fearhds,
mira esto:

<?php
ob_start();
?>

<?php
// ahora verificamos si el usuario y las contraseñas coinciden.
if ($usuario=="xxxxxx" && $password=="xxxxx")
{
$coincide="si";
}
else
{
$coincide="no";
}
?>
<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>


<body>
<?php if ($coincide=="si")
{
//header("Location: http://www.google.es/");
header("Location: index.php");
}
else
{ //ahora pondremos un mensaje de error en caso de que la contraseña no sea correcta
echo "<h1 aling=\"center\">\"Esta página es de uso familiar y amigos\"</h1>";
echo "<h1 aling=\"center\">\"Envia tus datos a este correo y se te enviaran las claves\"</h1>";
echo "<h1 align=\"center\"><a href=\"mailto:[email protected]\">joas@aquiestam os.es</a></h1>";

}
//echo <a href="index.php">www.aquiestamos.es</a></h1>
//echo <h1 align="center">&nbsp;</h1>
?>

<?php
ob_end_flush();
?>


</body>
</html>

---------------------------------------------------------

no recuerdo sus nombres pero es como abrir una sesion de php y cerrarla
ABRIR:
<?php
ob_start();
?>
-----------------------
CERRAR:
"]<?php
ob_end_flush();
?>

a mi es de la unica forma que me sirvió