Elaine n00b here again π
First I want to thank the members of this board for their amazing help. I have learned a lot from everyone who has responded to my posts and I am slowly being able to build my website to be more functional. Since posting to this board a few weeks ago I have learned how to expand my database, join tables, do multiple queries and even do some relevant if statements. Thanks everyone for their patience and generosity.
Now ... my latest question which I thought I knew the answer to but I've tried it with no luck ...
If I call up the url for an item in my database like:
http://www.domain.com/product.php?prod_id=1
I get the info for product 1 no problem. Now I only have about 60 products but lets say someone types in ..
http://www.domain.com/product.php?prod_id=61
I don't have a 61st product in my database but it still will show the template just with no information. I'd like to show a different kind of page if there is no product id. I have tried an if statement and I'm not having any luck because the prod_id isn't empty, it just doesn't exist. (i know how to display different info if the field is empty using an if statement)
How would I specify that i want to send the user to a different page if the prod_id doesn't exist?
Thank you very much in advance.
Elaine