I have a page demo.php. In this page I have some contents. Also I am passing values to the URL demo.php?id=1. This url generates dynamically. This url has some contents.
I want to hide the contents of demo.php in demo.php?id=1.
My Logic
if(basename(__FILE__, '.php')=='demo'){
//Show demo.php contents
}
else{
$id=$_GET['id'];
}
This is not working. This only hides the content of demo.php?id=1 in demo.php Not hiding the content of demo.php in demo.php?id=1
Please help me to solve to hide the content of demo.php in demo.php?id=1.