Hi,
I have a project which involves an image gallery with a user comments system (a logged into user can post comments underneath an image similar to deviantart.com).
I have all the php code working (image upload, user comments, user registration etc) but the problem is that the mysql tables in the database are not linked, therefore the user comments cannot be posted to a particular image (obviously lol )
So as MySql is not my strong point I would REALLY appreciate if someone could help me out with the statement to create the tables.
This is what I want:
table username:
username
password
email
USERID
table image:
imageTitle
imageURL
USERID
COMMENTID
table comment:
commentBODY
COMMENTID
So, when a user is logged in and uploads an image this is what happens:
add image detail in the image table and add the userid in the image table too
so when I call for that user you could select * from table image where userID == the user loggedin
same with comment when a user adds a comment you make a new commentID and add it to the comment table plus the userID of the logged in user
Any help would be gratefully appreciated!