<div dir="ltr"><div>It might be beneficial to start a thread somewhere like StackOverflow or Reddit for this...</div><div><br></div><div>I'm not sure it's particularly a good format to send programming support threads to a mail-all list...!<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><br><br>===<br>Tai Kedzierski<br></div><div>Linux Operations and Deployments Engineer<br></div><br><div dir="ltr"><span></span><font size="1"><br>I use <a href="https://www.libreoffice.org/" target="_blank">LibreOffice</a> , a free, Freedom-respecting replacement for MS Office<br><br><i>Open Source Free Software is a matter of liberty, not price.</i><br>
<a href="https://www.fsf.org/about/what-is-free-software" target="_blank">https://www.fsf.org/about/what-is-free-software</a><br></font><font size="2"><br></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 15 May 2020 at 20:14, Andrew Ramage <<a href="mailto:a.ramage@blueyonder.co.uk">a.ramage@blueyonder.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I don't know if this will work ...<br>
<br>
I have changed the form action call to a seperate file called <br>
"loginmusic.php" which checks the password and if it is correct assigns <br>
"OK" to $pwd.  If it is correct, the directory will be printed.<br>
<br>
index.php<br>
<br>
<script><br>
function dirmusic() {<br>
     $musicdir = array(); // declare and initialise an array like this<br>
     $dir = "Music/";<br>
<br>
     if ($_POST($pwd) == "OK")<br>
     {<br>
         if (is_dir($dir))<br>
         {<br>
                 if  ($dh = opendir($dir))<br>
                    {<br>
                         $x = document.getElementById("demo").innerHTML;<br>
                         document.getElementById("demo").innerHTML = $x <br>
. $file . "<br>";<br>
                  {<br>
                     while (($file = readdir($dh)) !== false)<br>
                         array_push($musicdir, $file); // array_push <br>
alters the array in place<br>
                     }<br>
                     closedir($dh);<br>
                 }<br>
         }<br>
     }<br>
     else<br>
     {<br>
          alert("You are not allowed to download music.");<br>
     };<br>
}<br>
</script><br>
<br>
<br>
-- <br>
EdLUG mailing list<br>
<a href="mailto:EdLUG@lists.edlug.org.uk" target="_blank">EdLUG@lists.edlug.org.uk</a><br>
<a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a></blockquote></div>