Hi,
I'm using to form to send emails to groups. In the form there is a possiblility to upload a file that will be attached to the email. In the email I want that the name of the attachment appears when there's one. When there's no attachment there has to be displayed that there's nog attachment
The fieldname of my attachment is bijlage. To display the name of the attachment I wrote in the email template {bijlage} and it displayed the name. But when there's no attachment it just displays {bijlage}. So i tried to write an if statement in php that compares the value of {bijlage} with a text string {bijlage}. The problem is that I can't escape the curly braces. They are eer interpreted as a character.
Below you find the php cde i tried to use. So i was wondering if there's another way to dertermine if there's an attachment uploaded
I'm using to form to send emails to groups. In the form there is a possiblility to upload a file that will be attached to the email. In the email I want that the name of the attachment appears when there's one. When there's no attachment there has to be displayed that there's nog attachment
The fieldname of my attachment is bijlage. To display the name of the attachment I wrote in the email template {bijlage} and it displayed the name. But when there's no attachment it just displays {bijlage}. So i tried to write an if statement in php that compares the value of {bijlage} with a text string {bijlage}. The problem is that I can't escape the curly braces. They are eer interpreted as a character.
Below you find the php cde i tried to use. So i was wondering if there's another way to dertermine if there's an attachment uploaded
<?php $bij = '{bijlage}'; if($bij == "{bijlage}"): ?> Attachment: none <?php else: ?> Attachment: {bijlage} <?php endif; ?>