trying to make a menu
Posted: Fri Mar 16, 2007 8:15 pm
im trying to make a menu that when you click on it it updates one section of the page and the rest is the same
i dont know how to do this with menu manger so i got this php code but the problem is when i click on a link it just goes back to the homepage of the site
or if i can do the same thing using menu manager it would be better
the default pages works but not the links, just goes to home page with url .../index.php?cat=category1
but it works on my computer which is not using cmsms
i dont know how to do this with menu manger so i got this php code but the problem is when i click on a link it just goes back to the homepage of the site
or if i can do the same thing using menu manager it would be better
Code: Select all
// Define our array of allowed $_GET values
$pass = array('category1','category2','category3','default');
// If the page is allowed, include it:
if (in_array($_GET['cat'], $pass)) {
include('uploads/videos/' . $_GET['cat'] . 'php');
}
// This will load the default page:
elseif (!isset($_GET['cat'])) {
include ('uploads/videos/default.php');
}
// If the page is not allowed, send them to an error page:
else {
// This send the 404 header
header("HTTP/1.0 404 Not Found");
// This includes the error page
include ('error.php');
}Code: Select all
<a href="index.php?cat=category1">category1</a>but it works on my computer which is not using cmsms