close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Uploaded file names not passed to email.

Thread begun 6/02/2022 3:16 pm by BillHobbs | Last modified 6/06/2022 10:45 am by Ray Borduin | 216 views | 2 replies |

BillHobbs

Uploaded file names not passed to email.

I have a form where I upload files, store the file names in the database and then send an email to the client. I store the information in hidden fields and everything but the uploaded file names are being passed. Everything but echoing the file names in the email is working correctly.

Upload Page:
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "clientuploads/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["UploadButton"]) || isset($_POST["UploadButton_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "clientfiles1", "0", "", "false", $WA_UploadResult1_Params);
}?>
<input name="File1" type="hidden" id="File1" value="<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["WA_UploadResult1_1"]["serverFileName"]; ?>">

Email Page:
<?php echo((isset($_POST["File1"]))?$_POST["File1"]:"") ?>

I also tried <?php echo $_SESSION['clientupload_files_clientfiles1']; ?>

The upload page allows you to upload up to 5 files.

Sign in to reply to this post

Ray BorduinWebAssist

Hidden form elements are submitted with the form, so it won't have a value yet. That technique won't work.

Just add this to the top of your email body page:

global $connSiteDB, $WA_DFP_UploadStatus;


Then you can refer to the uploaded files in the email just like you do in the insert like:

php:
<?php echo($WA_DFP_UploadStatus["WA_UploadResult1"]["WA_UploadResult1_1"]["serverFileName"]) ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

BillHobbs

Thanks, worked like a charm.

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...