Recommended Answers
Jump to PostHi Amy,
I think its better to store it in a temporary folder.. not the php temp folder, but the one you create....
1) Instead of saving it directly to the database, first store it in some location, say temp_upload_folder (custom folder you created)..
2)Store the files location & name …
Jump to PostHi..
This first part looks good...
That means, the file is now getting uploaded on the uploads directory..Now the next part is to get this file validated by the user
<?php //If the user does not like the image if($_POST['dont_save']=="true") { unlink(".../uploads/$_SESSION['name']"); } else { …
Jump to PostSeems you have kept your file inside some folder..
something like..
-uploads
-some_directory
-your_php_fileJust change the path name from ".../uploads" to "..uploads"
Hey.. wait a minute... may be i dint mentioned.. wenever you want to upload a file, then you have to give the complete absolute path..
…
Jump to PostHi..
Whenever there is a permissions error, then you have to use chmod thing.. so u got that right...And as far as the above thing is concerned, why are you using the temp_name...
The temporary name is given to the file that is created while uploading the file …
Jump to PostHi..
It would be great if you could post me the whole code..
Including where the sessions are being set... Just to review..
Because from the above code, seems no problem here...
All 22 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.