Link to home
Start Free TrialLog in
Avatar of krutarth941
krutarth941

asked on

File Upload in php

Hello, I am creating a job portal site. I want to add the functionality of file upload. I wish that end-users should be able to upload files and also delete the files if required. Could you please suggest me how should I go about doing that? Could yoiu recommend me some useful links that I  can refer to or some code for file upload.
Where am I suppose to store the file? is it suppose to be stored in database or is it required to be in the directory forlder on the server?
SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of theGhost_k8
Did you search in EE ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of krutarth941
krutarth941

ASKER

Hello Ray, Thankyou verymuch for your help. I tried to execute your script. I am getting this errors.

Results: File Upload

Warning: move_uploaded_file(/web/users/k0171569/RAY_junk/tsunami4.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /web/users/k0171569/inc/fupload.php on line 125

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpa8oayT' to '/web/users/k0171569/RAY_junk/tsunami4.jpg' in /web/users/k0171569/inc/fupload.php on line 125

ERROR: RAY_junk/tsunami4.jpg NOT SAVED - SEE WARNING FROM move_uploaded_file() COMMAND
Have you got a writable directory named RAY_junk?  I only use that directory name so I can periodically discard the stuff that clients upload to my server.  The demonstration scripts are live and I often get stuff from people who tested them.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.