I recently used variables in my URLs for simplicity sake but switched to another method. Now I want to go back again and use them. However I cannot seem to do so. It is a strange problem. The code I am using is:
<?php
if($pg == "")
{
include("home.php"); //include the home page
}
else //if $pg points to a specified page...
{
include($pg . ".php");
}
?>
However for some strange reason, this no longer works on my server. The error I get says that it is trying to open a file named ".php", for some odd reason it doesn't get the variable I put in it like: index.php?pg=games/game1
Please help if you know what is going on! Thanks!