1 00:00:00,000 --> 00:00:00,112 2 00:00:00,112 --> 00:00:02,320 ZAMYLA CHAN: Our users have got to make cash somehow. 3 00:00:02,320 --> 00:00:05,430 So let's allow them to sell some of their stocks. 4 00:00:05,430 --> 00:00:09,622 For this, you'll need to display a form for the user to sell their stocks. 5 00:00:09,622 --> 00:00:11,580 I'll leave this up to you because we've already 6 00:00:11,580 --> 00:00:16,350 had practice at this point creating HTML forms and new templates. 7 00:00:16,350 --> 00:00:19,410 Once you're done, come back to me and let's remove that stock 8 00:00:19,410 --> 00:00:21,570 from the user's portfolio. 9 00:00:21,570 --> 00:00:24,750 You can either, depending on the structure of your database, 10 00:00:24,750 --> 00:00:27,870 use the DELETE FROM query, or perhaps you'll 11 00:00:27,870 --> 00:00:31,590 want to log that sale as maybe a negative quantity in the user's 12 00:00:31,590 --> 00:00:33,150 portfolio. 13 00:00:33,150 --> 00:00:35,190 Finally, you'll want to make sure that you 14 00:00:35,190 --> 00:00:38,790 update the user's cache, remembering that every stock is 15 00:00:38,790 --> 00:00:42,140 going to be sold at its current price. 16 00:00:42,140 --> 00:00:43,443