Solved

SQL Font Color

Posted on 2009-07-15
2
665 Views
Last Modified: 2013-12-13
I'm wanting to make the SQL result show in a lime green #00ff00 but i can't seem to make it work without causing an error.

The GiftPrice is what I would like #00ff00, along wiht the $ sign, which is showing green.
echo "<p><font color='#00ff00'>$</font>" .mysql_result($result,$i,"GiftPrice");

Open in new window

0
Comment
Question by:mimoser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
ID: 24866039
Try this:
echo '<p><font color="#00ff00">$'.mysql_result($result,$i,'GiftPrice').'</font>';
 
# ...or this:
$GiftPrice = mysql_result($result,$i,'GiftPrice');
echo '<p><font color="#00ff00">$'.$GiftPrice.'</font>';

Open in new window

0
 

Author Closing Comment

by:mimoser
ID: 31604084
Perfect, thank you!!
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question