Jump to content

[SOLVED] Force error 404 when querystring match not found


limitphp

Recommended Posts

I have a page artist.php?artistName=name

I rewrite the url for this page so it looks like this:

http://localhost/greckle/artist/James-Tucker-Band/

 

When they click on a page I take the artistName and match it against the database.

Is there a way to make the page say Error 404 Page not found when the artistName doesn't match?

 

In other words, when I run the query select * from artist where artistName = artistname

 

if it doesn't match any records, is there a way to make the official error 404 page show instead of creating one that looks like it?

 

or should I just create one that looks like it?

 

thanks

 

 

 

Really you need to create a nice error message, As a user might think your web site is down,

or even your web site is crap, Be careful not everyone, No what the error messages mean..

 

So in essence create a nice error message with your header and footer included.....

Really you need to create a nice error message, As a user might think your web site is down,

or even your web site is crap, Be careful not everyone, No what the error messages mean..

 

So in essence create a nice error message with your header and footer included.....

 

Oh yeah...Good point.  So you think I should just say artist not found.....

 

thanks guys.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.