ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Check if there's an attachment/upload

braziboy 11 Oct, 2009
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

<?php
$bij = '{bijlage}';
if($bij == "{bijlage}"): ?>
      Attachment: none
<?php else: ?>
      Attachment: {bijlage}
      <?php endif; ?>
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com