Hi guys,
Let's say that I've got a very basic html formatted page. And on this page, I want to display the date and time the visitor came to visit the page. Can I use the date function from PHP and just simply rename my original .htm file to .php3 ?
| SitePoint Sponsor |



Hi guys,
Let's say that I've got a very basic html formatted page. And on this page, I want to display the date and time the visitor came to visit the page. Can I use the date function from PHP and just simply rename my original .htm file to .php3 ?
yes.
You can also do this in js if you don't want to have to use PHP.



I knew I could do it in JS but I just don't wanna use it so PHP is for me. Thanks !





~FYI~ If you have any other questions about PHP, you may want to post in the "Server Side Scripting & Database Development" Forum, which will give you a wider audience for this subject type ~~ WebKat, Senior Advisor
Dlynn :: SitePoint Senior Advisor ::
PawPrint Designs by WebKat
"Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly



Ok, thanks Webkat !
The thing about using PHP or any server sided language, the date/time function gives the date/time of the Server location and not that of the User's.
So using Javascript will be good for this purpose.



Oh boy, I didn't know that ... Thanks !




but using javascript just calls the time from the persons cpu clock, and ifs not set right, the site time is wrong.
i suggest using the date fuction with perl.. although i've never used it in php and don't know how it would work.
Bookmarks