I am working on a project and am currently doing the learning aspects of coding.
Anyway im trying to allow users to upload/share there own photos how can i allow users to upload photos to the server from there computer or a external link/ such as eg: google.com/images/image.png or jpg etc..
You can start the way I did, the way I nearly always do. Look up 'image upload example' on Google, download some of the example scripts, practice with them. Then, after you know a a bit more, come back and ask any more questions you need answered.
Im hoping i can use the database todo this, some people on google say that it needs to be done by directoies...
Yes, you need directories, you can either make temporary directories, have people make a directory with their username, or choice of name, and you can make sub-directories with their choice of names. The database will make it easier and better. The best way is to keep all the users directories in a 'big' directory that only has users directories in it, nothing else. That 'sandboxes' them from the rest of the files. Keep all the data in the database, although you can put some user files in their own directories. All very 'do-able' with php, just needs to be coded. Hve fun.
Ok Thanks, so how does facebook keep all there images in one folder how complex...
So if i keep all photos in a directory how do i make a delete/create direcotry with php? and make it echo it on a page & create the paths in the database?
This seems to be complicated..
Facebook uses the database. The image files are all given new names, which are just sequential numbers, by using a queing function which just increments each time a new image needs to be named. No two numbered alike. The original name is kept alongside the new name in the database. There needs to be two databases, one for the users info, including a list of their photos by new name, and one for the new names and the old names. More info can be included in either one, but that is an absolute minimum. So you have to decide which one is more complicated, theirs or mine.