Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/06/2012, 11:55
Avatar de skamter
skamter
 
Fecha de Ingreso: agosto-2009
Mensajes: 72
Antigüedad: 14 años, 9 meses
Puntos: 1
Respuesta: Login con sesiones y cookies php

Y el ultimo

correcto.php

<?php
require ("funciones.php");
$error = 0;

seguridad();

if(isset($_POST['salir']))
{

destruirCookie($_COOKIE['identificado']);

$_SESSION = array();

$session_name = session_name();

unset($_SESSION['logcok']);

session_destroy();

if ( isset( $_COOKIE[ $session_name ] ) ) {
setcookie($session_name, '', time()-3600, '/');
}
if(isset($_COOKIE['identificado'])){
setcookie('identificado', '', time()-3600, '/');
}
header("Location: index.php");
exit();

}

?>


<body class="home blog layout-right">

<br /><br />
<br /><br /><br /><br /><br />
<h1 class="entry-title">Has sido logueado correctamente <?php echo '<span style=\"color:#009900;weight: bold\">'.$_SESSION['logcok']. '</span> ' ; //AQUI ES DONDE NO APARECE EL USERNAME SINO EL CF_ID
?>.</h1>
<br />
<form name="username" method="post" action="">
<div align="center">
<table>

<tr>
<td align="right"><input type="submit" name="salir" id="salir" value="Salir" /></td></tr>
</table>

<?php
if ($error) {
echo '<br/><strong>logcok o clave incorrecta</strong>';
}
?></div>
</form>

<br /><br />
<div id="p1"></div>



<br /><br />
<div id="atras"></div>
</body>
</html>