Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/04/2010, 13:21
Avatar de truman_truman
truman_truman
 
Fecha de Ingreso: febrero-2010
Ubicación: /home/user
Mensajes: 1.341
Antigüedad: 14 años, 2 meses
Puntos: 177
Respuesta: Update al cerrar el navegador

No se nada de ajax.
Yo pensaba hacer que cuando se inicie sesion se cree una cookie con un valor 1, sin tiempo, tonces cuando el navegador se cierre, se destruye sola, y tonces pongo
Código PHP:
if ($_COOKIE['conectado']!=1){
     
////////////////////////////////ONLINE******************************************
    
include("Connections/conex_online.php");
    
$desconectar="UPDATE  registro_general SET online=0 WHERE username='$user'";
    
mysql_query($desconectar,$conex_online);
    
mysql_close($conex_online);
    
////////////////////////////////FIN ONLINE******************************************

Pero no funca obvio,