add time stamp to a post?

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
suha

add time stamp to a post?

Post by suha »

Script URL:
Version of script:
Version of PHP:
Hosting company:
Have you searched THIS FORUM for your problem:
(if not please do before posting)
If so, what terms did you try:

Write your message below:

Hi, GBook is very easy to config. It works just fine. Thank you for the great job!

Now i like to show the time stamp as well to each post on the guestbook. I find the code for the "date" stamp

Code: Select all

$added=date ("F j, Y");
I guess maybe there is a similar code like "time (???)". But I'm not sure. Anyone can help? Thank you in advamce.
suha

Got it

Post by suha »

Thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Try this:

Code: Select all

$added=date ("F j, Y \a\t H:i:s");
Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
suha

Post by suha »

It works. Thank you very muck.
Rasmus

Post by Rasmus »

Hi.

I also changed the code but it didn't work for me.

$added=date ("F j, Y \a\t H:i:s");

But after i removed a and t it worked.

$added=date ("F j, Y H:i:s");

Rasmus Christensen.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Make sure you don't forget the \ before a and t!

\a\t - correct

at - WRONG!

But without the \a\t it will also work of course.

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply