if($pageid == '') {$pageid = 'home';}
Database connection
ok so the above code gets a page id from the url and uses that to get info from a database.. ive included an if statement to account for times when people go to the base dir without the tag call..
what i want to be able to do is create an statement to account for times when people put in an invalid pageid, the code would look in the database and obvously if the pageID is wrong nothing will come back, i wana write something that states if database call is false post a code which will display a 404 error.. if (database = "") {$pageid = 'error'};
the if 'database' is just to illustrate the point..
anyone know how to check if a databse call is false?