Need assistance with the following code, i have a form providing a "id", when submitted the next script gets the data from the database, if for some reason the "id" is zero, how can i forward the url to my 404 page.
Code:
$id=$_GET['id'];
include ('dbconnection.php');
include ('dbopen.php');
include ('header.php');
I have tried the following, but no success to move client to the 404.php page if "id" value is null.
if (isset($_GET['id']) && !empty($_GET['id'])) {
header('Location: index.php');
}
Please help :D