Posted by Garry Jones on 10/23/50 11:40
I am new to php and just using it to replace frames and simplify code. I
have a website with 7 sections. Each section can be identified by a
number.
The user can click on any one of 7 buttons to choose a section.
I want a different colour for the button of the page that is activated.
I have tried this
<?php $page = 1 ?> 'to number the active page
Then to colour the buttons.... I want to choose between two different
colour buttons from within a defined table.
<td WIDTH="83" BACKGROUND="buttons_etc/ 'first part of button code
selects directory where file is
<?php 'identify php code
if ( $page1 == 1 ) 'if page is 1
{top-menubutton-orange.gif">} 'orange button
else ' or do this
{top-menubutton-red.gif>} 'red button
?> end php code
This way it should dynamically create either of the following lins of
code.
<td WIDTH="83" BACKGROUND="buttons_etc/top-menubutton-red.gif>
<td WIDTH="83" BACKGROUND="buttons_etc/top-menubutton-orange.gif>
But it doesn't. I need some help to grasp this syntax.
Garry Jones
Sweden
[Back to original message]
|