Hi guys, I'm currently creating a website with a user profile. I want to set it up so user's can upload a photo for their profile page. I was thinking the best way was to copy the photo to the root folder and link to the photo that way. Is there a way you can make it so the photo only appears a certain size(in other words to display small version of it) so as it fits a section perfectly Thanks for any help guys
You can either use html tags <img src="foo.jpg" height="150" width="150" ?> This is the simplest way but the image is still the same filesize - its just resized. You can use php to evaluate if the image needs resizingif you want to keep the dimensions of the original image. or... resize the image with php - www.php.net/gd and.... create a thumbnail with php - try http://phpthumb.sourceforge.net/ also... Check : http://uk2.php.net/getimagesize
Personally I would store the images in a database as binary and call it out and re draw it by doing like: <img src="profile_img.php" width="150" height="150"> Then you can just walk the table with session id to get your profile and info. or you could store the file location in mysql and look it up that way as well. Either way I would try and keep everything in one place, your system will thank you on the lack of overhead usage heh