Group Email Form in PHP

Permalink
I have added a new block from the marketplace which enables PHP code to be run within concrete. Some general queries work fine from MySql. I am having a problem with a particular set of code which prints a form to be filled out subject, message and reply to. Then when executed it grabs MySql email addresses and sends everyone an email. The problem is when I go back into edit the form within concrete it truncates (always at line 61) the code rendering it useless. I then have to erase and re-copy the code back into the block. The code works as long as I don't try to edit it. An additional problem because I am calling the code form outside of concrete it makes the code un-protected. I've attached some sample code.

1 Attachment