close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Adding attachments from recordset - need to specify folder

Thread began 11/15/2018 2:42 am by georgina_barrett_187762 | Last modified 4/14/2020 11:43 am by georgina_barrett_187762 | 506 views | 18 replies

Thomas Hill

Sorry this may have been my poor explanation – I am trying to get a recordset loop to send multiple attachments. The only way I can get the loop to work is if the attachments are stored within the same folder as the PHP file but this gets a little messy for storage and I'd rather have them stored in a dedicated folder. I've attached 2 files to illustrate one which works (single recordset) and another which doesn't (recordset loop).

working.php – If you look at line 122 this method works but (obviously) only sends one attachment.

not-working.php – I have updated the MYSQLi recordset on line 34 to include the path using CONCAT (as suggested at the top of this thread) and then used the recordset loop function on line 122 but no files get attached. My thoughts are that the issue is with the CONCAT method since I have added <?php echo($ALL_uploaded_PDF_files->getColumnVal("Attachment")); ?> to the email which is sent and it displays the relative link correctly. Therefore is the script actually looking for files named "../quotationfiles/filename.pdf" and not seeing this a relative link?

Possible solution
I could of course create maybe 5 separate recordsets and limit each one in turn i.e. 0,1 1,2 etc but this would only allow up to 5 attachments and there maybe a scenario where I need to attach more

Your help would be much appreciated.

I hope you are well and staying safe during this horrid time.

Many thanks,

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...