I have a MySql db that I use for logging, when I log a event i use the following SQL:
$logtime = time();
#build the sql
$sql = "INSERT INTO log VALUES (NULL, $logtype, '$loguser', '$logip', '$logpage', $logtime )
";
All variables have a value.
When I retrieve the data and try and configure the time, it always comes up with the same date. I use this code to get the Stamp:
#configure date and time
$logtime = $fromlog['time'];
$stamp = date("Hhi I d F",$logtime);
And then echo $stamp. But everytime it shows:
03h14 0 19 January
I have tested that the $logtime variable is being chacnged with each record and it is, the number is different eveytime but the result is still the same. I have also used the strftime() function and that does the same.
Cheers
Marcus