Jump to content

Use one database for several php functions?


Delta223

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.