page that accesses it. Needlessly redundant I think.
I have tried to declare a global variable in PHP at the start of each HTML page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <?php global $page_view ; $page_view="index"; ?> <html> <head>
Obviously a different value for each page
Then in the contact page I tried to use an IF/ESLE to select which page to return to, but no success. The following
example has only 2 choices. It displays both button but will only execute the second one.
<div id="info_buttons"> <?php $select=$GLOBALS["page_view"] : ?> <?php if ($select="index") : ?> <a href="../../index.html"><img src="../../images/button_back.png" alt="Back" /></a> <?php else : ?> <a href="../index2.htm"><img src="../../images/button_back.png" alt="Back" /></a> <?php endif : ?> </div><!-- ends info_buttons -->
I am new to PHP and have spent 2 days running around in circles. Any help would be greatly appreciated. Thanks.
This post has been edited by Atli: 15 March 2012 - 04:00 PM
Reason for edit:: Please use [code] tags when posting code.