Jump to content

Change colour of text after an if statement


simon_c

Recommended Posts

Hi

I've been using PHPmaker, so cheated and don't know any PHP code really

I just want the following to change the colour to red to highlight the fact that an order has not been paid for yet, perhaps the text should be bold as well

Can any one add

style="color: #FF0000;"

To

<?php
if ($x_Date_funds_received == "")
$x_Date_funds_received = "Out standing";
echo FormatDateTime($x_Date_funds_received,5); ?>

This would be a great help and finish this project of

Many thanks

Simon
Link to comment
Share on other sites

[code]
<?php

if ($x_Date_funds_received == "")
$x_Date_funds_received = "<b><P color='#ff0000'>Out standing</p></b>";
echo FormatDateTime

?>
[/code]

[code]
<?php

$text="<b><P color='#ff0000'>Out standing</p></b>";

if ($x_Date_funds_received == "")
$x_Date_funds_received = $text;
echo FormatDateTime

?>
[/code]
Link to comment
Share on other sites

Spoke to soon, can get it bold but not red

$text="<b><P color='#ff0000'>Out standing</p></b>";
if ($x_Date_funds_received == "")
$x_Date_funds_received = $text;
echo FormatDateTime($x_Date_funds_received,5);

I can't modify the header as this is set by PHPmaker and causes errors

Any ideas why it will not pick up on the text colour ?
Link to comment
Share on other sites

$text="<b><P color='red'>Unpaid</p></b>";
if ($x_Date_funds_received == "")
$x_Date_funds_received = $text;
echo FormatDateTime($x_Date_funds_received,5);

Still shows in black text, don't worry 'Bold' is good enough to highlight the upaid accounts. Must be contradicting other code for the text colour set by PHPmaker.

Thanks for your help
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.