How to concatenate a php variable in an echo statement with a javascript onClick event?
0
0
I am developing an application where each user has a uid and that uid is a folder. I have changed the name of the current directory to the uid and this displays the proper files on a dropdown of the files in the folder that is on the page but then the location still goes to the parent folder and not the the uid folder. How do I concatenate the uid variable with the location so it is going to the right folder? Here is what I have so far <?php chdir("$uid"); echo "<select name='menu'>"; $files = array_filter(scandir($dir), function($item) { return $item[0] !== '.'; }); foreach (glob("*.php") as $file){ if ($file != 'new.php' && $file !='config.php'){ echo "<option value='$file'>".basename($file,...