Hello kirupas, dont know if this should be on serverside, but I try here.
I’ve tried to add date and time to the Kirupa flash/php/xml guestbook with this code, which I found in the forum:
myDate = new Date();
myHour = myDate.getHours();
myMinute = myDate.getMinutes();
myDay = myDate.getDate();
myMonth = myDate.getMonth();
myYear = myDate.getFullYear();
for (i=(firstItem-1); i>=lastItem; i--) {
myGuestbook.htmlText += "<font color='#ff3399'>"+myDay+"."+myMonth+"."+myYear+" "+myHour+":"+myMinute+"</font>
";
myGuestbook.htmlText += "<font color='#ff3399'>"+this.firstChild.childNodes*.attributes.myName+" wrote:</font>
";
myGuestbook.htmlText += this.firstChild.childNodes*.firstChild.firstChild.nodeValue+"
";
}
The thing is, when I upload it to the server, it only shows the current time on my computer. If i reload the page one minute later, the dates in the guestbook will change one minute.
I guess I’ll have to change something in the php or xml file too, the question is what.
What would you suggest?
Hre’s the xml code:
<?xml version="1.0"?>
<guestbook>
<entry myName="...">
<myText>...</myText>
</entry>
</guestbook>