Jump to content

Users Avatar


Maknib

Recommended Posts

Hi guys,

 

im just trying to work out an app in my head and on paper. im just wondering..

when a user registers they can choose an Avatar 100px by 100px jpg, when they upload one would i then grab the file and store all Avatars in a avatar image folder and rename it to something like.. avatar[user_id].jpg and keep them all in the same folder.

 

or

 

would i crate a folder called users, each user gets their own folder with files like avatar.jpg and it finds the [user_id] folder and pulls the avatar out from that, or is there a more prefered method?

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/223642-users-avatar/
Share on other sites

Make a field in a database for the user,save the path/image name into the field.

Make a central folder for avatar images.

 

So when the user uploads their image you can then delete the old image if wanted, maybe let them use external links if wanted.

 

Link to comment
https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156069
Share on other sites

ah i see thanks.

yes i was going to use extrnal links or upload images (with a max size of course)

 

just playing around trying to get it all working getting my head around PHP. so much fun. one i have it working i'm going to try to convert it into a MVC structure. :)

Link to comment
https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156072
Share on other sites

 

sounds difficult haha, i think i'll just stick to upload image must be under thisMany/kb and then just resize to 100px 100px

 

i'm guessing i could use CSS to say image must be 100 x 100 (or say image will resize to

Link to comment
https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156079
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.