Hi all, I would appreciate any help with this, as i have looked all over the web on how to handle this and cannot find an example!
I have a site with 2 columns; main content and news/portfolio, which work from includes driven by a variable to call the correct page with. The main page starts by defining the initial content of these two columns. I want my navigation to set session varibales to remember the content of these columns without passing a long string to the URL.
i.e. The user clicks the cdrom portfolio button, which refreshes the whole page and changes the main content page to the initial cdrom page and the portfolio column to the cdrom selection page. Now if the user clicks a link in the main content window which displays a second image, I want the Portfolio column to remember it is still displaying the cdrom portfolio links.
you can view this happening here, http://www.biglike.com/main.php
but it was set up with way to many indivdual pages, and i know that session variables can help me out here.
this is as far as i have gotten:
<? session_start();
header("Cache-control: private");
//if the page view variable does not exist, set initial page view variable
if (!$_SESSION['sideBar']) {
$sidebar = "web";
session_register("sideBar");
} else {
$sidBar = $_SESSION['sideBar'];
}
if (!$_SESSION['content']) {
$content = "aboutCon";
session_register("content");
} else {
$content = $_SESSION['content'];
}
this correctly sets the initial pages to be viewed, but i need a way to set the session variable from my navigation bar, which is images. I thought maybe a function was the way to go, but the it didn't like the attempt at the redirect, and i had trouble passing calling it from the image buttons too.
function contentPage($page) {
echo $page;
$content= $page;
session_register("content");
header("Location: http://www.biglike.com/mainTest.php");
}
thanks in advance!
--rob