I know this should be really simple, but im having trouble getting this to work right, basically i want to have an image upload box that uploads an image and then puts the new url into a mysql database. Anyone have any advice on how to do this, as i may be having developer block but im over complicating it in my head :P Thanks
thanks for this very helpful :)
Jason
2010-06-09 12:55:44
A:
Assuming some kind of LAMP server, the uploaded files will be placed in a temporary directory. You will have to move them from there to their final destination and I usually give the moved files a new file name to avoid any security problems. Of course the original file-name is available so you can keep it as well, either as a file-name or as an entry in a database.
What are you precisely having problems with?
jeroen
2010-06-08 23:27:50
I know how to upload the file, but im just trying to think would it be as easy as upload file to /uploadso it uploads /upload/example.jpgthen get the name of the file and insert /upload/example.jpg to image table?im just thinking what i do to get the name to the db :)
Jason
2010-06-08 23:46:08