Im trying to redirect the user so if they enter an invalid GET['id'] in the url they will be redirected to the home page.
NOTE: Ive made it work when the GET is empty with the code below
} else if (empty($_GET['id'])) {
header("Location: home.php");
exit;
}
But my URL is only taking ints as 'id' :
website/edit.php?id=10
What I want is to be redirected to the homepage if user entered a letter for example:
website/edit.php?id=g
Is this possible? Thanks for your time!