justAnoob Posted March 24, 2009 Share Posted March 24, 2009 ok,, i have students that register on a site. of course when they register and are put into the database they are assigned a id number automatically. lets say that the student then signs in and decides to upload some pictures of there family or new car that they want others to see, When I am writing the upload script how do i associate the id number of the user with the picture. so if they upload 10 pictures, all 10 pictures will have the same id number as the student id. oh yeh, the student info and there picture info are in different tables. any ideas??? or any examples out there I could look at??? Quote Link to comment https://forums.phpfreaks.com/topic/150957-need-a-step-in-the-right-direction/ Share on other sites More sharing options...
Maq Posted March 24, 2009 Share Posted March 24, 2009 Make another table with 2 fields: stu_id, picture_id Quote Link to comment https://forums.phpfreaks.com/topic/150957-need-a-step-in-the-right-direction/#findComment-793075 Share on other sites More sharing options...
justAnoob Posted March 24, 2009 Author Share Posted March 24, 2009 right, i have two tables already,,, student info and picture info..... when they are uploading the pics, what do i do to associate the 2,, even if one student has multiple pics... Quote Link to comment https://forums.phpfreaks.com/topic/150957-need-a-step-in-the-right-direction/#findComment-793082 Share on other sites More sharing options...
Maq Posted March 25, 2009 Share Posted March 25, 2009 Assign the id of the student to "stu_id" and whatever you store for the picture (probably the relative path). Quote Link to comment https://forums.phpfreaks.com/topic/150957-need-a-step-in-the-right-direction/#findComment-793552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.