[KLUG Members] session variables

Lunitix lunitix at earthlink.net
Sun Dec 5 02:37:38 EST 2004


Is there a way to place a variable within a variable in php.

ie

page1

session_start();
$_SESSION['var1']= "0";
$_SESSION['var2']= "0";
$_SESSION['var3']= "0";
...etc...
link to page2


page2

if ($var1 == 0) {
echo "image1 with link to page3";
} else
echo "imageblank";

if ($var2 == 0) {
echo "image2 with link to page3";
} else
echo "imageblank";

if ($var3 == 0) {
echo "image3 with link to page3";
} else
echo "imageblank";


page3

if ($istrue)
return to page2
else
link-to-make-query-true-and-reload-page;$_SESSION['here is where the 
session_variable needs to be variable based on the link from page2']'

If the $_SESSION variable on page3 didn't have to change, this works 
easy, but there are currently 80 links on page2 that this query should 
affect.

Sorry for the mess trying to explain what I am trying to do.  But the 
pages I'm writing on are test pages and don't look a whole lot better at 
the moment.

Jon
Minding of Madness



More information about the Members mailing list