Thanks for the fast reply.
I fixed it as follow:
in file: include_phpuploader.php
I created an $_SESSION named "tellerPics" who keeps count of the pictures i uploaded.
I placed the session in the following function
- function _ValidateFile($filename,$filesize)
- {
- $_SESSION['tellerPics'] +=1;
- }
then in the file:
ajaxuploadhandler.php
I included the session into my naming prefix.
- if( $uploader->SaveDirectory )
- {
- $targetfilepath= "$wd/picProj" . $_SESSION['projectID'] . "_". $_SESSION['tellerPics'] .".jpg";
- }
Hope this will also help some people.
Notice: When you initialise your $phpuploader->render(); you have to be sure that your session has been reset!