jammy74 — 2014-08-16T20:18:40-04:00 — #1
I was wondering how would i go about this little task,
so say i have an image called background.png, i want my users to be able to upload an image which saves (my guess is i need to store it in a database) for the user and replaces the default image
droopsnoot — 2014-08-19T08:34:42-04:00 — #2
Absolutely. You'll need some way of identifying the user, so at some point they'll have to sign in and upload the image. At that point I think I'd look at creating a cookie so your site can identify the user when they return (although some will disable cookies) and then each of your pages will need to establish the user id, find out whether they have a custom background image, and output it as part of the page if they do. Presumably your background will be defined in the overall site CSS, so it will be just a case of overriding it in the page header.
jammy74 — 2014-08-19T13:09:32-04:00 — #3
Thank you for the reply!
stevenhu — 2014-08-19T14:41:06-04:00 — #4
You'll also want to check for the image type (jpg, png), and size in pixels to restrict what they're allowed to upload.