Ver Mensaje Individual
  #7 (permalink)  
Antiguo 05/08/2008, 12:37
cchusann
 
Fecha de Ingreso: julio-2008
Ubicación: Ecuador
Mensajes: 153
Antigüedad: 16 años, 8 meses
Puntos: 0
Respuesta: sesion.... ayuda...

Mira asi me funciono no se si algo esta mal pero la etiqueta cerrar sesion si me funciona....

Código PHP:
<?
session_start
();
?>
<!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>
<script language="javascript">
<!--
function cerrar_sesion(){
<?php
session_destroy
();
?>
location.href='../index.php'
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>
<style type="text/css">
<!--
a:link {
    color: #000000;
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #000000;
}
a:hover {
    text-decoration: underline;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}
.Estilo1 {font-family: Verdana}
-->
</style></head>

<body>
<pre><strong><?php 
echo "<div align='left'>";
echo 
"usuario:";
echo 
"&nbsp;";
echo 
$_SESSION["usuario"]; 
echo 
"</div>";
?>
</strong><span class="Estilo1"><a href="#" onclick="cerrar_sesion()">cerrar sesion</a>
</span></pre>

<pre>&nbsp;</pre>
</body>
</html>