php die() message formatting

Discussion in 'PHP' started by jacka, Mar 22, 2007.

  1. #1
    Hi

    I am trying to format the text in php inside die() where it says...
    if (!isset($_POST['pn']) || trim($_POST['pn']) == '' ) {

    die(" Please enter a valid part number!");
    }....


    All I want to do it to format the text inside the die(..) to a different colour.
    Can any one help me please?
    I have searched alot on google and afew forums but don't seems to find a solution to my small problem.

    Thanking you in advance.
    Jacka
     
    jacka, Mar 22, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Just use HTML.

    
    die('<span style="color: #xxxxxx;">Please enter a valid part number!</span>');
    
    PHP:
     
    nico_swd, Mar 22, 2007 IP
  3. jacka

    jacka Peon

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wowwww
    Worked a treat many thanks.
     
    jacka, Mar 22, 2007 IP