Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change color of text from database 2

Status
Not open for further replies.

JacobTechy

Programmer
Apr 14, 2005
181
US
How can I change the color of text for some database fields that get populated in a php page. I want name, datetime and hr different colors. Below is my code in php.

echo $name;
echo '</a>';
echo ' - Posted on '.$datetime.'<br />';
echo ''.$comment.'';
echo '<hr />';
 
What about:

echo "<span style='color:red'>" . $comment . "</span>";

 
thanks
I am new to php and I am setting up a messageboard.
that helped.
 
Check out for tutorials on many web technologies. I would suggest learning more about (X)HTML and CSS as the coloured text above is achieved by using PHP to output (X)HTML and CSS code to the browser.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top