User Profile

Collapse

Profile Sidebar

Collapse
dburns
dburns
Last Activity: Jan 11 '12, 10:59 PM
Joined: Jan 10 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thank you again for your followup. Here's the code, which contains "Name & Email" rows I would like to 'not include' if they're not filled out.

    Code:
        public function sendAdminNotification($email, $subject) {
            
            $n = "<br />";
            
            $headerStyle = 'style="font-weight: bold; background-color: #BCDAFC;"';
            $message = "Date:
    ...
    See more | Go to post

    Leave a comment:


  • Thank you but it appears the code enveloped in the $message variable is strictly defining what's allowed between the two dots:
    Code:
    " . if($_POST["AddName2"] != '') { 
    echo "<tr><td". $headerStyle." >Name</td><td>" . $_POST["AddName2"] . "</td></tr>" ; 
    } . "
    Per above, I still get syntax error: syntax error, unexpected...
    See more | Go to post
    Last edited by dburns; Jan 10 '12, 12:37 PM. Reason: Forgot to add.

    Leave a comment:


  • dburns
    started a topic Email headers $message - Don't Show if not exists
    in PHP

    Email headers $message - Don't Show if not exists

    Somewhat new to Php. I inherited a simple piece of email processing code that stores the submitted form fields in the $message variable. Their are some fields that may not exist when the form is submitted so I'd like to not include them.

    The second row (AddName2) is an example of a row I don't want to include in the email submission if it doesn't exist:
    Code:
    $message = "Date: " . date("F d, Y") . "
    ...
    See more | Go to post
No activity results to display
Show More
Working...