Jump to content

Recommended Posts

$timestamp= mysql_query("SELECT UNIX_TIMESTAMP(timestamp) FROM utopia WHERE kullaniciadi='$session->username'");
$hedef = mktime(date("H"),date("i")+1,date("s"),date("m"),date("d"),date("Y"));
$simdi = time ();
$fark = $timestamp - $simdi;
$days_left = floor($fark/60/60/24);
$hours_left = floor(($fark - $days_left*60*60*24)/60/60);
$minutes_left = floor(($fark - $days_left*60*60*24 - $hours_left*60*60)/60);
print " $minutes_left dakika!";


if($row['bolge'] !== 'yol' ){
$result = mysql_query("UPDATE utopia SET timestamp=FROM_UNIXTIME($hedef) , bolge='yol' WHERE kullaniciadi='$session->username'") 
or die(mysql_error());  
echo "Centriaya seyahatiniz $minutes_left dakika sürecek.";
}
else{
}

if($fark > 0){
echo " $minutes_left dakika beklemelisin.";
}
elseif($fark <= 0){
$result = mysql_query("UPDATE utopia SET bolge='centria' WHERE kullaniciadi='$session->username'") 
or die(mysql_error());
echo " Geçmiş olsun."; 
}
else{
}

it can simply be seen what i tried to do but several big FALSES around here  i now.

adding 3 minutes to current time and saving into mysql..

according to the difference between that time and the current time print x minutes last.

so simple to write it:-) aaa, and i have some problem about time formats.. date time and mysql time.. i dont know how to save and how to read it, actually dont know if it is necessary in this page????

pls help.. im so bored for about 5 hours here!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.