Solved

Can you change the text/font of PHP output messages and errors such as to white, on a black site?

Posted on 2008-06-24
6
202 Views
Last Modified: 2008-06-25
Hello

Is it possible to change the text style of messages from PHP and maybe MySQL while I'm asking?

My website background is black so obviously I cant see any appear I have been pressing CTRL+A on the page for the last 2 weeks lol  Also the messages show behind elements on my site so I need to CTRL+C and then CTRL+P into notepad lol

Its a bit much work to read it. This is one of those questions I bet I should know, something obvious! but then that happens to me sadly!!!

Thanks anyone
0
Comment
Question by:Ryan Bayne
[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
6 Comments
 
LVL 14

Accepted Solution

by:
Vel Eous earned 125 total points
ID: 21860033
<style type="text/css">
body{
font-color: #FFF;
}
</style>
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 21860085
Aw I tried to delete this question too late lol

It hit me after it you can encapsulate a block of PHP so that its output is styled. Just setting the body font-color never popped up though.

thanks bud
0
 
LVL 5

Expert Comment

by:codeQuantum
ID: 21860158
There is an easier way than encapsulating the whole php code or changing the whole page style...

Take the MySQL errors for examples. Wrap them in a CSS definition, and style it. Have a look at the code and tell me if it is clear :


// your MySQL query	
$result = mysql_query($query, $conn);
// we capture the error message and style it
if (!$result) errorDie('<h2 class="error">Invalid query: '.mysql_error()."\nWhole query: ".$query."</h2>"); //debug

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:agriesser
ID: 21860202
There are configuration options in php.ini to make this work:

; String to output before an error message.
;error_prepend_string = "<font color=ff0000>"

; String to output after an error message.
;error_append_string = "</font>"
0
 
LVL 5

Expert Comment

by:codeQuantum
ID: 21860213
wow I didnt know that. Thanks agriesser.
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21860255
You're welcome :) That's what EE is for - never stop learning ;)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

732 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