Delta223 Posted June 26, 2010 Share Posted June 26, 2010 Hi all, I'm currently still in the learning phase for php, but I was able to install a contact form script and attach it to a database. It works perfectly so I gave myself a pat on the back for figuring it out. The next thing I would like to do is setup my copyright year to automatically update. I believe the code for this is <?php echo date("Y"); ?> However I'm sure sure how to connect this second function to a database yet, or if I even need to. Can someone advise me on this? Quote Link to comment Share on other sites More sharing options...
Alex Posted June 26, 2010 Share Posted June 26, 2010 Why would you have that year updated? The year when displayed along side the copyright notice is simply the year when it was registered or claimed. Oh, and to answer your question, there's no need to use a database for something like this. Quote Link to comment Share on other sites More sharing options...
Delta223 Posted June 27, 2010 Author Share Posted June 27, 2010 Why would you have that year updated? The year when displayed along side the copyright notice is simply the year when it was registered or claimed. Oh, and to answer your question, there's no need to use a database for something like this. The site looks more up to date if the copyright is the current year. Where does php pull the information from then? Surely it must come from somewhere? Quote Link to comment Share on other sites More sharing options...
Alex Posted June 27, 2010 Share Posted June 27, 2010 It doesn't pull it from a database. It calculates it based on the unix timestamp of the computer that PHP is executing on. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.