Código PHP:
<?php
session_start();
if(isset($_GET['cerrar'])){
session_destroy();
}
else if(isset($_SESSION['login'])){
header('Location: app.php');
}
else if(isset($_GET['error'])){
switch($_GET['error']){
case 1:
echo '<script>alert("Correo o password incorrectos.")</script>';
break;
case 2:
echo '<script>alert("Sesión no iniciada.")</script>';
break;
}
}
?>
Código:
He intentado solucionarlo buscando espacios en blanco en el codigo e intente ocultar el error a travez de .htaccess y nada! Ojala me puedan ayudar :D Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /mnt/host-users/s/u/m/summer/index.php:1) in /mnt/host-users/s/u/m/summer/index.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /mnt/host-users/s/u/m/summer/index.php:1) in /mnt/host-users/s/u/m/summer/index.php on line 2