I do not understand why it does not redirect to the page that I ask, I have hours trying to redirect and I do not get it to work, I am trying to know in a URL the ID parameter, otherwise I redirect to the page, but this does not work, I have others redirect codes but all have exit ();
if (isset($_GET['id'])) {
//ok show de page
}else{
header('location: pages.php');
exit();
}
Note: if in the else
I put echo "no id";
it works.
Any ideas, thank you!