Yeah, I'm back...

I'm revamping my own site, finally...going for the same sort of dynamic system I was 
using for my last creation.  Currently, I have index.php returning lots of different 
pages from a mysql database; what I'd like to do is have a somewhat more elegant 
solution for spitting back a 404 page.

The way it works now, is a hard-coded list in index.php; if you ask for page id 1 it 
gives page id1, 2 returns 2, etc, for every page that exists.  If you ask for a 
nonexistant page it asks for 404, and spits back the contents for the error page.  
What I'd like to do is have it look in the database, determine whether or not the page 
you asked for exists, and then return either the page you asked for or the 404 I can just add a new page to the database without having to edit the php 

The script is currently living at and I've got it also 
retrievable as a text file at the above url with .txt appended.

I know there's an easy way to do this...I'm just braindead at the moment.  Staring at 
this thing for too long I guess.  :)

Thanks in advance,
Dan the Noob

Reply via email to