Dynamic URLs

john010117

Verified User
Joined
Dec 18, 2006
Messages
5
Location
Bungie Studios
Hey all,
All those other php help sites failed me. I hope this isn't the case here.

On my index page, I have a news section. No php needed for that. But I want the website to automatically archive old news when the next day comes. So, if I type in index.php, it should automatically get the news for today (but I'm typing up the news). Sorry if this doesn't make sense. I want to have something like this (see the date at the top and the arrows?). How do you do that?

So, to view archived news, the URL will just be like index.php?date=122906 or something like that.

BTW, I know I need a database (which I already have).
 
If I get what you are saying correctly the easiest way to do this would be to put some PHP on the news page. Have it so it gets todays date and then queries the database to grab the news with the same date as the current day so that all old news does not show up on the main page and only current news from that day does.

You can then have it pull up old news based on date as you said you want it to as well by using the date inputted to query database and find news with same date as is in the url.
 
Back
Top