Hi.
I hope somebody can help me with this.
I have the following code I can't get to work in the body of a connection. What I'm trying to achieve is create a link to a file only if a file has been uploaded via a Chrono Form, and to show something else if there's no file.
If there's a file it does create the correct link (components/com_chronoforms/uploads/CondAdminForm/XYZ.jpg), but if there's no file, instead of showing "no file" the link is incomplete, with no file at the end (components/com_chronoforms/uploads/CondAdminForm/)
What's wrong?
Thanks!
I hope somebody can help me with this.
I have the following code I can't get to work in the body of a connection. What I'm trying to achieve is create a link to a file only if a file has been uploaded via a Chrono Form, and to show something else if there's no file.
<tr>
<td>
<?php
if
(file_exists('components/com_chronoforms/uploads/CondAdminForm/' . $row['letter']))
{
echo '<a href="components/com_chronoforms/uploads/CondAdminForm/' . $row['letter'] . '">letter</a>';
} else {
echo "no file";
}
?>
</td>
</tr>
If there's a file it does create the correct link (components/com_chronoforms/uploads/CondAdminForm/XYZ.jpg), but if there's no file, instead of showing "no file" the link is incomplete, with no file at the end (components/com_chronoforms/uploads/CondAdminForm/)
What's wrong?
Thanks!