You are here: Getting started « PHP Programming Language « IT news, forums, messages
Getting started

Posted by Garry Jones on 09/29/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация