Here is another problem I am facing. I have to upload confidential report (word or pdf) and the file must be encrypted on the fly and the file will be decrypted on the fly again when appropriate authority login. I have created a table called "Report" where rportid (PK), employeeid (FK), userid (FK), report (blob) fields. what I would like to upload report for specific employee and the file will be encrypted and stored in the database not in the the root folder. the Report list page shows only file link under report field, so when the appropriate authority click on the link then the file will be decrypted on the fly and popup in a separate window either in word or pdf it does not matter. I appreciate any ideas to accomplish this in my phpr7.0 project. I am using MySQL as my database. Thanks in Advance.