Hi all,
I have a nextensio form that enable file upload/download and works on a file table.
All file are uploaded on the user folder. The user folder is created based on the userID session variable when logged in.
The admin user can see all file uploaded by all users. And can edit them.
The admin can change the user field on a file record.
But when you edit a file record changing only the user field, no update on the file field will take place, since you didn't change the file field. So, the file is orphaned on the previous user folder.
I would like to update the file field even when the file field is not changed. How can I do this?
TIA
tony
newxtensio form and force update uploaded file?
Re: newxtensio form and force update uploaded file?
I would add a tick-box somewhere on the form that can be ticked if the files needs to be moved.
Upon updating the file have your script check if the box is ticked and if so send the page to a different page where you can use the php rename() function.
It is primarily a rename function but here is examples of how to use it to move a file as well
http://fr2.php.net/manual/en/function.rename.php
Hope it points you in the right direction.
Upon updating the file have your script check if the box is ticked and if so send the page to a different page where you can use the php rename() function.
It is primarily a rename function but here is examples of how to use it to move a file as well
http://fr2.php.net/manual/en/function.rename.php
Hope it points you in the right direction.