I am trying to write an if statement on a product details page. The idea is this... Right now a user will vew a number of products listed on a page like this one here:
Link Here
When you click on one of the products it will take you to a description page Like this one here:
Link Here
All that works just fine, but here is the problem... when other sites link to individual products on the details page and that product has been removed from the database, the details page takes a crap and displays nothing like the kink here:
Link Here
Some people may not think it is a big problem, but when a seach engine indexes your page with that product and the product is removed leaving an invalid page, the search engine will at some time in the future notice this and remove you from its index. So I want to make small if statement that will display "Product No Longer Available" instead of trying to display a product that is no longer there.
I would like to remove the entire table that the product description is in and replace it with an image if the db record no longer exists.... is this possible? I did it with ASP years ago but have not done anything like this with PHP. Any help would be great!!
Thank you
Randall