jQuery, PHP deleting of directory does not work -


I'm trying to delete directories using jquery, it's 1A.P.P. But deletes and stays, which implements the code executes. What I need to do is delete a directory without refreshing the page refresh, and the directory has been removed to display a display.

Please tell me what I am doing wrong here.

Thanks advance Dave

  Please find the code given below ----------------------- -------- --- 1a.php if ($ _POST ['al_del']) {$ dir = $ _POST ['al_del']; // preg_replace ('/ (\ d +) /', '', $ _POST ['al_del']); Rmdir ('$ dir_path /'. Dir); Echo 'deleted the album'; } // /-----------------------------------1.php where directories are listed & lt; Script & gt; $ ('# Album_del_form'). AjaxForm ({target: '# diaper_', success: function () {$ ('# dir_del'). FadeOut (40000);}}); & Lt; / Script & gt; & Lt; Div style = "position: relative; top: 20px; left: 0px; background color: #bbbbb; font-family: 'arial round MT bold'; font-size: 12px;" & Gt; Current album & lt; / Div & gt; & Lt; Div style = "position: relative; top: 20px; left: 4px; font-family: 'ariel round mt'; font-size: 12px;" & Gt; By & lt;? $ Album_path1 = "$ dir_path /"; $ Cur_dir = opendir ($ album_path1); Chdir ($ album_path1); $ I_count = 0; While (($ file = readdir ($ cur_dir))! == Incorrect) {? & Gt; By & lt;? If (($ file! = ".") & Amp; amp; ($ file! = "..") & amp; (is_dir ($ file))} {$ i_count = $ i_count + 1; ? & Gt; & Lt; Div id = "dir_del" & gt; & Lt; Form name = "album_del_form" id = "album_del_form" method = "post" verb = "1a.php" & gt; & Lt; Input type = "image" src = "image / deleteengf" name = "al_dl" id = "al_dell" value = "& lt;? Echo $ file ;? & gt;" /> & Lt;? Copy $ file; ? & Gt; & Lt; Input type = "hidden" id = "al_del" value = "& lt ;; echo $ file ;? & gt;" / & Gt; & Lt; / Form & gt; & Lt; / Div & gt; By & lt;? }}? & Gt; & Lt; Div id = "dir_del" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

I think you are passing the file:

  & lt; Input type = "hidden" id = "al_del" value = "& lt;? Echo $ file ;? & gt;" / & Gt;  

and a1.php are expecting a directory:

  $ dir = $ _POST ['al_del'];  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -