I have an upload button (ajax) that allows users to upload multiple files to a temp directory. I am trying to figure out a way to have php/ajax count the amount of files and when it reaches say 5 images that the upload button disappears.
I do not have a problem counting the files with PHP or counting it in the session. I can also do an if statement to hide the file upload button but I would have to refresh the page for that to work.. I was hoping you guys would give me some direction on this issue..
Here is how I am counting the files
$subn = $_SESSION['fname'] . $_SESSION['lname'] ; $files = glob("temp_photo/$subn*.*"); $count = count($files); echo $count;
Thanks in advance! Dan