php - Databrowser with move function -


i have written little databrowser, can create folders, created on server , in sql table 'folder', in 'folder' table userid saved too.

now want code move function moving files around folders, function gets folder names created user, , puts them input form.

in last query doesnt gets folderid, cant put folder id imglinks table.

hope understand, , can me. thanks.

move.php

<form action="move.php" method="post">   <label>move to:     <select name="folders" size="5">     <?php     include "config.php";     session_start();      $uid = $_session['username'];     $dir = "uploads/" . $uid;     $dir_inhalt = scandir($dir);     $moveimg = $_get['moveimg'];      foreach($dir_inhalt $folder){         if($folder != "." && ($folder != "..")){              $sql = "select * folder uid='$uid' , foldername='$folder'";             $folderresult = mysqli_query($conn, $sql);             $folderarray = mysqli_fetch_array($folders);             $folderid = $folderarray['id'];              echo $sql;              if(is_dir($dir .'/'. $folder)) {                 echo "<option class='foldername' name='". $folderid ."'>$folder</option>";             }           }         }         ?>         </select>       </label>         <input type="submit" value="move it!">     </form>      <?php         $move = "insert imglinks (folderid) values ('$folderid') id='". $moveimg ."'";     mysqli_query($conn, $move);      var_dump($move); ?> 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -