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
204 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

717 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