hey guys, Im a newbie & this is my questions, How do I put today's date on my web page? So that the date updates automatically please help me
Search in Google, you will find many variations with instructions... http://www.google.com/search?hl=en&q=date+script&aq=f&oq=
I find using Javascript the easiest. Just paste this anywhere in your PHP or HTML page(s) and it works like a champ. Best of luck. Michael <SCRIPT LANGUAGE=JavaScript><!-- Begin var months=new Array(13); months[1]="January"; months[2]="February"; months[3]="March"; months[4]="April"; months[5]="May"; months[6]="June"; months[7]="July"; months[8]="August"; months[9]="September"; months[10]="October"; months[11]="November"; months[12]="December"; var time=new Date(); var lmonth=months[time.getMonth() + 1]; var date=time.getDate(); var year=time.getYear(); if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year="19" + year; if (navigator.appName == "Netscape") year=1900 + year; document.write("<left>" + lmonth + " "); document.write(date + ", " + year + "</left>"); // End --></SCRIPT>
Be aware that Javascript, or any other method that polls the user's computer for date information, will only return the date information as is set for that computer. In other words, if that information is incorrect, the resulting date you polled for will also be incorrect. As long as you don't necessarily need correct information you will have no problems. However, if it is critical that the date information be correct, you must get the date information from a reliable source - Never from the user's computer.
Why the heck? Do you think I dunno today's date? Then I'm probably too tipsy Why would you load your website with excess code? What is the point of having a date?