1 00:00:00,630 --> 00:00:01,320 Welcome back. 2 00:00:01,710 --> 00:00:07,680 Now, what we need to do is that we need to get the user I.D. in the registration page and also in the 3 00:00:07,680 --> 00:00:08,430 place order. 4 00:00:08,820 --> 00:00:15,450 So in the registration page, upon registering after the user registers a new account, after the user 5 00:00:15,450 --> 00:00:19,140 creates a new account, we need to get their ID. 6 00:00:19,290 --> 00:00:24,000 The idea that was given by the database, which is going to be unique and it's very, very important. 7 00:00:24,480 --> 00:00:34,110 So to get that ID we can use, remember here in the place order, we have used this for this variable, 8 00:00:34,110 --> 00:00:41,310 which is this member variable which is in serious ID to get the ID that was inserted, which is the 9 00:00:41,310 --> 00:00:41,730 user ID. 10 00:00:41,880 --> 00:00:48,240 So here in this case, it's going to be here after after we make sure that the account has been created, 11 00:00:48,630 --> 00:00:57,330 we can say we can see user ID is equal to and then statement is the empty. 12 00:00:59,330 --> 00:00:59,960 And then. 13 00:01:00,960 --> 00:01:04,890 Insert it and then we need to insert the user ID in decision. 14 00:01:04,890 --> 00:01:07,020 So we need to say session. 15 00:01:08,030 --> 00:01:15,320 And then user underscore I.D. and here, here we can say user. 16 00:01:18,860 --> 00:01:20,060 In the login page. 17 00:01:20,060 --> 00:01:29,690 We already have the user I.D. We already got the user I.D. upon logging the user name and the place 18 00:01:29,690 --> 00:01:29,960 order. 19 00:01:29,960 --> 00:01:36,590 Remember in the in the place order, I have said here that the user ID is going to be one just for it, 20 00:01:36,590 --> 00:01:42,800 for testing and just for just for not leaving it empty because we couldn't leave that empty. 21 00:01:43,310 --> 00:01:47,120 Now it is sort of saying, one, I'm going to get the user ID from this session. 22 00:01:47,120 --> 00:01:52,190 I'm going to say session and then user underscore ID. 23 00:01:54,300 --> 00:01:55,620 User underscore. 24 00:01:58,590 --> 00:01:59,340 And that's it. 25 00:01:59,640 --> 00:02:01,740 And make sure that the key is user underscore. 26 00:02:02,100 --> 00:02:05,490 And here, make sure again that the key is user underscore it. 27 00:02:06,270 --> 00:02:09,120 And here, make sure that the key is user underscore. 28 00:02:09,360 --> 00:02:16,350 Because otherwise there will be a conflict, conflict between IDs and between keys and you will not 29 00:02:16,350 --> 00:02:19,380 be able to get the user I.D. here. 30 00:02:19,380 --> 00:02:26,100 We also have I think we we have here the user I.D., which is this user ID, which is which is this 31 00:02:26,100 --> 00:02:26,310 one. 32 00:02:26,310 --> 00:02:28,020 So we don't have to change anything else. 33 00:02:28,680 --> 00:02:29,160 That's it. 34 00:02:29,160 --> 00:02:31,020 And everything is perfect.