Sin Zero
New Member
- Messages
- 17
- Reaction score
- 0
- Points
- 0
I am trying to set up a guestbook code and have hit a problem. Nothing that stops it from functioning, though.
I have it setup to timestamp the entry and when I try to view the date and time an entry was posted, i get the same date (1969-12-31 19:00:00) which is obviously not the correct date.
The code for the timestamp function is:
and the insert function is:
Any suggestions?
I have it setup to timestamp the entry and when I try to view the date and time an entry was posted, i get the same date (1969-12-31 19:00:00) which is obviously not the correct date.
The code for the timestamp function is:
PHP:
function getMysqlDatetime($timestamp) {
return date("Y-m-d H:i:s", $timestamp);
}
PHP:
$query="INSERT INTO inu_guestbook VALUES('','" . getMySqlDatetime($timestamp) . "','$name','$rating','$message')";