Hey all, I needed to make a simple upload script so users could upload their images but had a small extra requirment, after searching google, hotscripts and all the other usual places and downloading code, i realized its better to write the whole damn thing myself, so i did.
Now that the little history lesson is over.....I have run into a problem which i am sure you guys must have too, when you take the uploaded pic of the user...how do you save it? I dont mean saving onto disk, i can do that, i mean the name of the file...I am having all the pics upload to one common directory (member_pics) so what do you suggest I name the pictures? eg: username.jpg? first_last_name.jpg? <random_number>_username.jpg? etc etc (for this example i wrote only jpg, i will be having png and gif too) The reason I didnt want to use the user's username as his pic name is coz then if someone wanted to break into his account they already know the username and they could try to bruteforce the password... if i use first and last name...there is a _small_ possibility of 2 members having the same first and last name... so.....back to the subject of my email.....How do you guys do this? Another question related to this, I am restricting the uploaded files to be jpg,png and gif for security..anything else you suggest for security's sake? This is my first working upload script...I dont know everything and trying not to screw up so any and all help appreciated. Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php