cc email based on checkbox
The set up works as follows.
A user clicks on a banner that calls up specific details from a database and appends those details to a form (hidden) with additional fields for their name, email address to enter etc. etc.
At the bottom of the form is a checkbox which is binded with the email address thats pulled from the database.
The option is, if this checkbox is clicked the email address binded to the checkbox also receives a copy of the whole form including the appended details that were pulled from the database when submitted.
This final part is not working as for some reason regardless of whether the checkbox is checked a copy is still sent to that specific email address.
Any suggestions on how to fix this?
I've attached a stripped out page with current code minus the design etc.