yes, thanks evo4ever. However, I do have a problem. Here's a sample of how I have the directories:
index.php
catalog/catalog.php
catalog/rings.php
catalog/bracelets.php
The problem I have is that whenever I enter a boggus url query string to test the php script, the page it's suppose to go to shows up all messed up. This is the script I'm using to test:
if(isset($_GET['category']))
{
$cat=$_GET['categoru'];
if(file_exists($cat.".php")
{
if($cat=="rings")
include($cat.".php");
elseif($cat=="bracelet")
include($cat.".php");
else
include("../index.php");
}
else
include("../index.php");
}
else
include("../index.php");
a query would be from the index.php page targeting the catalog.php like this:
catalog.php?category=rings
I dont see anything wrong with the code, from index.php I can go to catalog.php, using my links. But when I enter something like:
catalog.php?category=adfaf
its suppose to go to index.php, however, there is no error, just that the page does not show up correctly. When I view the source, it is indeed the index.php, all the html is there. Its really strange.