...

View Full Version : Upload button



dk4210
12-02-2010, 04:16 PM
Hello Guys,

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;

Spudhead
12-02-2010, 05:01 PM
Since you're asking a question related to client-side AJAX code, it may help if you post the client-side AJAX code you're using.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum