0
<?php ob_start(); ?>

 <?php 
include("connection.php");


 //this makes the time in the past to destroy the cookie 

$aa=$_COOKIE['md'];
 $bb=$_COOKIE['li'];
$h1=$_COOKIE['h'];
$m1=$_COOKIE['m'];
date_default_timezone_set('GMT');

if (date_default_timezone_get()) {
     'date_default_timezone_set: ' . date_default_timezone_get() . '<br />';

     date("l, F d, Y h:i" ,time()) .'<br />';
    $date_str = date("l, F d, Y h:i" ,time()); //ex:from database

$date = new DateTime($date_str,new DateTimeZone('GMT'));
$date->setTimezone(new DateTimeZone('Etc/GMT+5'));
 "$bb.<br>";
 $x=$date->format('H:i:s'); //testing
 $x;
$v1=4;
$v2=67;
$v3=$v2-$v1;
 $h2=$date->format('H:'); //testing
 $m2=$date->format('i');
 "<br>$v3";
$h3=$h2-$h1;
$m3=$m2-$m1;
$s=$h3.":".$m3;
 $s;
 "time spend is".$spend=$s;
}
 "this is orignal".$h1.$m1."<br>";
if (ini_get('date.timezone')) {
 'date.timezone: ' . ini_get('date.timezone');
}
$conform=mysql_query("UPDATE user_ts SET user_ts_ulo='$x',user_st='$spend' where user_ts_umd='$aa' ");
if($conform)
{
     $past = time() - 100; 
 setcookie(ID_my_site, gone, $past); 

 setcookie(Key_my_site, gone, $past); 

 header("Location: index.php"); 


}
else
{

}
 ?> 
<?php ob_flush(); ?>

Edited by Nick Evan: Fixed formatting

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.