The point here is: 1) user_id in the users table is linked to the messages table and user_images table. 2) 'id' in the user_images table is linked to the images table3) messages table is linked to the forums tables using the forum_id

NB: The user_images table is ment to be a look up table so that when a user with acct_ type designer is logged into the site, he can upload images via this user_images table.

Secondly, parent ID is used to track a reply to the same subject in the messages table.

Summary:What I am trying to design is a database where users(who are designers) register into my website whose details are stored in the users table and the login to upload images onto the website.

I am not sure if my design is right and the main issue is how to upload images into the database once a user is logged in. Thanks.ncax2

You need to populate that user_id column like the other columns in your INSERT query. INSERT queries do not have WHERE clauses.

Also, you cannot use addslashes() to escape variables for a MySQL query. You must use mysql_real_escape_string(). There are other things than single quotes that need to be escaped, especially when inserting binary data as you're doing.