Skip navigation
Currently Being Moderated

Problem with message email/PHP

Mar 22, 2013 3:16 AM

Why are these two lines merging together in the email message?

 

PHP -

 

$email_body .= "Burial:" . isset($CAT_Custom_76928)?"No":"Yes"."\n";

$email_body .= "Cemetery fees: £$CAT_Custom_76931.\n";

 

Email message appears like this -

 

NoCemetery fees: £0.

 

You see the the word 'No' belongs to the php code  -

 

$email_body .= "Burial:" . isset($CAT_Custom_76928)?"No":"Yes"."\n";

 

and 'Cemetery fees: £0.' belongs to the php code -

 

$email_body .= "Cemetery fees: £$CAT_Custom_76931.\n";

 

but why do they both appear on the same line in the email message, also why doesnt the word "Burial:" appear in the email message?


 
Replies
  • Currently Being Moderated
    Mar 22, 2013 4:06 AM   in reply to Ness_quick

    Try changing this -

     

    $email_body .= "Burial:" . isset($CAT_Custom_76928)?"No":"Yes"."\n";

     

    to this -

     

    $email_body .= "Burial:" . isset($CAT_Custom_76928)?"No":"Yes"."\r\n";

     

    and this -

     

    $email_body .= "Cemetery fees: £$CAT_Custom_76931.\n";

     

    to this -

     

    $email_body .= "Cemetery fees: £$CAT_Custom_76931\r\n";

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 4:58 AM   in reply to MurraySummers

    Better, try changing this -

     

    $email_body .= "Burial:" . isset($CAT_Custom_76928)?"No":"Yes"."\r\n";

     

    to this -

     

    $email_body .= "Burial:" . isset($CAT_Custom_76928)?"No\r\n":"Yes\r\n";

     

    See if that helps.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 5:04 AM   in reply to Ness_quick

    That's curious indeed.  Let's try this -

     

    $email_body .= isset($CAT_Custom_76928)?"Burial: No\r\n":"Burial: Yes\r\n";

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 5:15 AM   in reply to Ness_quick

    $email_body .=isset($CAT_Custom_76928)?"Cremation: Yes\r\n":"Cremation: No\r\n";

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points