Uploading / Storing Photos

images php coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Uploading / Storing Photos

Post by egami » Thu Nov 11, 2010 10:52 am

the second is the better option.

in your images table, just have a field where you can reference your user and their pictures.
for example..

/var/www/images/mysite/* is your images directory.

your mysql table is called images
table has the following fields..
img_id, img_userid,img_name,img_uploaded
img_id is your key
img_userid is your key to assoc the user
img_name is the name of the file uploaded into the /var/www/images/mysite directory
img_uploaded is the datetime stamp when it was actually uploaded.


Then you can map the links of the photos, call them whenever needed, etc.etc.etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests