I am at a loss here and I am trying to figure out a workaround but need some help. I am creating a site for online courses. I want members to be able to signup and login as a free member to my site. Once they are members, they can purchase a course I have created. I will have 3 courses to begin with but I want to be able to add more courses. I have a courses, module, and lessons collection created. For example Course #1 will have 4 modules and 3 lessons per module. I have a members database created. How can I limit the member to only see the courses they purchased? Do I need a separate database for purchases? I am trying to create a page that allows users to select the course they are interested in buying once they are a member (i.e. you cannot buy the course unless you are a member first). Once they select the course they are interested in buying I have them submit a button with that course and send them to a buynow light box where there is a payal link to purchase. Within the paypal function I can redirect the user to a particular page, so my thought here is that I create a page that is a completed purchase page that only members can see and is not indexed and the member hits a button that says complete the purchase and a check box is checked that is a hidden element (i.e. all white in the top corner) that upon hitting completed purchase it updates the member profile to confirm purchase of course number 1. Because the member is already logged into the members area it will grant them access to this page. Once the member has completed the purchase they can go to a profile page and click on “my Courses” and only see the courses they have purchased and then click on that course. Once they go to that course, they are directed to the courses page that is linked to those specific modules. However when I do that now it is creating a separate entry for the member instead of updating the members row.
If I create a references column to purchased courses that references “course title” I cannot update that field unless I do it manually in the database. Even if I manually update it, I cannot “display” by that column in a table. What I am I missing here? I am also trying to automate as much of this a possible, so when I create a forth course, I can create a page to enter the data for course title, the different modules, and the different lessons. Maybe this part has to be manual on the database side of things. I can live with that if I can just limit my members to only the purchased courses. Any help would be great.