0

My code so far:

$message = '<html>
                    <head>
                        <title><?php echo $subject; ?></title>
                    </head>
                    <body>
                    <?php

                        echo \'<table align="center" cellspacing="3" cellpadding="3" width="100">
                                <tr>
                                    <th align="left"><b>Player Name<b></td>
                                    <th align="left"><b>Number of Goals<b></td>
                                </tr>\';

                        while($row_GetCurMonthPlayerGoals = mysql_fetch_assoc($GetCurMonthPlayerGoals))
                        {
                            echo \'<tr>
                                    <td align="left">\' .$row_GetCurMonthPlayerGoals[\'FRName\']. \'</td>
                                    <td align="left">\' .$row_GetCurMonthPlayerrGoals[\'Sales\']. \'</td>
                                  </tr>\';
                        }

                        // Close the table:
                        echo \'</table>\';

                    ?>
                    </body>
                    </html>';

The email is sending but it is sending a blank message.

I am using the headers;

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

Have I used the escape character incorrectly maybe?

Thanks

3
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by Tinnin
1

Most of the message is being echo'ed out not appended to the message var - plus theres back slashes around all the quotes

$message = '<html>
                    <head>
                        <title>'.$subject.'</title>
                    </head>
                    <body>
                    <table align="center" cellspacing="3" cellpadding="3" width="100">
                                <tr>
                                    <th align="left"><b>Player Name<b></td>
                                    <th align="left"><b>Number of Goals<b></td>
                                </tr>';

                        while($row_GetCurMonthPlayerGoals = mysql_fetch_assoc($GetCurMonthPlayerGoals))
                        {
                           $message .= '<tr>
                                    <td align="left">' .$row_GetCurMonthPlayerGoals['FRName'].'</td>
                                    <td align="left">' .$row_GetCurMonthPlayerrGoals['Sales'].'</td>
                                  </tr>';
                        }
                        // Close the table:
                        $message .= '</table>
                    </body>
                    </html>';

Edited by Biiim: typo

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.