Hey i defined a php variable like this inside the body tag:
<?php $v=null;?>
Now i am using this code to check if the variable is set through the url
if ("<?php echo $_GET["v"];?>;" == null) {
// Do something because the variable is set through the url
}
else {
// Do something else because the variable is not set through the url
}
I am using an url like this: www.example.com/index.php?v=12345
When i run this code by opening the index with this url it says v is undefined.. When i run this code by opening the index with "www.example.com/index.php" it is undefined as well.. but not 'null'
What is the problem here? Thank you