close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DFP 1- delete file from specific folder not working

Thread began 2/09/2010 6:48 pm by webmaster286369 | Last modified 2/18/2010 6:13 pm by webmaster286369 | 786 views | 2 replies |

webmaster286369

DFP 1- delete file from specific folder not working

Hi-
I'm trying to delete a file using the delete file server behavior. It works fine as long as the folder isn't specific. However when I add the path for a different subfolder, it doesn't work.
(However the Insert and Update versions do, using the same method). Here is the code:

<?php //$folder comes in from the delete button links on Detail and Results pages
if (!session_id()) session_start();
$folder= ((isset($_GET["foldername"]))?$_GET["foldername"]:"");
?>
<?php //$_POST['file'] is posted with a hidden field down in the form, with the value coming from a recordset.
$WA_DeleteFileResult1 = false;
if(isset($_POST["Delete_x"])){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("../FILES/".$folder, "".((isset($_POST["file"]))?$_POST["file"]:"") ."");
}
?>

it works if I don't include ".$folder" in the path, but i need that functionality. Any help?
Thanks, Justin

Sign in to reply to this post

Jason ByrnesWebAssist

most likely the foldername query string variable isn't included as part of the forms action.


Set the action to:

php:
 action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>"




this will cause the from to include any query string variables when posting.

Sign in to reply to this post

webmaster286369

Thanks, that seems to work

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