hi everybody,
i am trying to store the time a user logs into the website into a mysql table.
i named the column start and gave it a timestamp type.
here's my php code:
$now = date("U");
echo $now."<br>";
connect("update user set start=$now");
$result = connect("select start from user");
$row= mysql_fetch_array($result);
echo $row["start"]."<br>";
echo date("h i s",$now)."<br>";
echo date("h i s",$row["start"])."<br>";
the output is:
1010944779
20001013224719
12 59 39
10 14 07
I also tried "select UNIX_TIMESTAMP(start) from user", but the two dates are different there too.
can somebody help me?
thanks.