Check that no variables have been passed
I have one file index.php, I am trying to inclu开发者_JAVA百科de splash.php when no variable is passed and display.php when any variable is passed.
This is what i have so far but i want to make it universal for all variables instead of just "query".
if (!isset($_REQUEST['query']))
{
include("splash.php");
}
else {
include("display.php");
}
if (count($_REQUEST) == 0) {
include("splash.php");
} else {
include("display.php");
}
though you're better checking $_POST or $_GET (as appropriate) rather than the looser $_REQUEST
精彩评论