This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » PHP » Setting dynamic links to a speciffic colour
Reply

Setting dynamic links to a speciffic colour

john henderson
Member



Since: 05 Feb 2009
Posts: 5
Posted 15 Sep 2009 18:28:59

Hi,

I wonder if any one can help me? [:I]

I have a php/mysql page that displays a list of house numbers, for example 1 to 10 that require work completing;

There is a case where some of these house numbers have already had the work completed, but will require inspection of the completed work.

Its been suggested to me that I should set the house numbers (font colour) to red or purple if they require inspection. This simple effect will visually inform the workers that they don’t need to look at that record because the work has been completed. But, will inform the inspectors to look at the record and fill in the relevant details.

I am able to perform the search for property numbers, but depending on the sql code (inspect_property=1) set the property number to the correct colour otherwise leave it at the default colour.

Hope that helps, but if you need more information I am happy to oblige

thanks

John


Hi,

I wonder if any one can help me? [:I]

I have a php/mysql page that displays a list of house numbers, for example 1 to 10 that require work completing;

There is a case where some of these house numbers have already had the work completed, but will require inspection of the completed work.

Its been suggested to me that I should set the house numbers (font colour) to red or purple if they require inspection. This simple effect will visually inform the workers that they don’t need to look at that record because the work has been completed. But, will inform the inspectors to look at the record and fill in the relevant details.

I am able to perform the search for property numbers, but depending on the sql code (inspect_property=1) set the property number to the correct colour otherwise leave it at the default colour.

Hope that helps, but if you need more information I am happy to oblige

thanks

John


Patrick Julicher
Official Representative



Since: 04 Feb 2002
Posts: 1,208
Replied 16 Sep 2009 18:07:41
Hi John,

I'm not familiar with PHP, only ASP but what you could do is use an If.....Then....Else statement somewhat like this:

If inspect_property=1 Then show show housenumber with specific style1
Else If inspect_property=2 Then show show housenumber with specific style2
Else If inspect_property=3 Then show show housenumber with specific style3
Else show show housenumber with default style
End

Hope this makes any sense!

Kind regards, Patrick
Alan C
Total freaking Member



Since: 04 May 2006
Posts: 473
Replied 14 Oct 2009 12:43:56
try applying a span class to the appropriate house numbers as you generate them, the css should then make those links a different colour.

you would do something like . . .

in the css set up a class .alreadyDone{ . . . .}

then in the php . . .

if done, echo a span tag with that class, then close the tag after the link

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency