How to show Attachment in PHP [RESOLVED]

I want to display the results of the form input into a PHP format that I made myself, all data working good but only the display in the form of uploaded attachments not working well.

The appearance doesn’t match what I want, While the display that appears in my PHP script as below:

I want it to look like the default in inbox or status, like the example image below:
f1 f2

Here is the PHP script that I use:

Please help so that my PHP script can display uploaded attachments as default.

You want to show the name of the file, with that hyperlinked to the file itself, is that correct?

If so, you will need to modify your script to output the HTML to wrap the URL to the PDF in an anchor [a] tag, and use the name of the file as the display text. That information is all in the $entry object you would be looping through to get this data for your PHP script.

Hi Chris,
yes…i already try to find another way… and i found the solution…
working script:

<a href="<?php echo $form_data['field'][31][0]; ?>" ><?php echo basename($form_data['field'][31][0]); ?></a>

thankyou Chris…

1 Like

Thank you for the update.