PHP Changing text colour of $_SESSION['error']

I am creating a login script for a webpage. The code validates the data inputted and if there is something wrong, it posts text to the web page. However, this text is in black and can't be seen on a black website. I've tried setting a div around my code, css body styling but none of it works.

Here is an example line from my code

if($_POST['password'] == '')  {
$_SESSION['error']['password'] = "Password is required.";  
}

In this case, the "Password is required" will be in black text but I would like it in white. If it helps, towards the end of my code I have:

if(isset($_SESSION['error']))
 {
  header("Location: index.php");
  exit;
 }

Any ideas would be much appreciated

Cheers

Answers


$_SESSION['error']['password'] = "<span style='color:#FFFFFF'>Password is required.</span>";

Need Your Help

function return code block query

php function return

Quick question to do with php functions, it may sound silly to some of you but I dont want to get in to bad habits. Is there anything wrong with doing the following?