I'd like my users to upload pictures for their items I'll assign a directory for it. I know how to create a form and save it in mysql database but I don't know how to write a script that will fetch the file from their computer and save it in the directory that I assigned. After uploading, I'd also like to rename the file using random numbers (big int).
Together with, I'd like to create a thumbnail for each picture that they upload and resize it to my prefered size if they upload a large file maintaining the aspect ratio and somehow the quality of the picture.
Another thing is, I noticed that whenever I save a string with "'", it returns an error. How do I prevent this?
Thank you very much in advance for the help.