I'm thinking of adding check boxes beside the list of ingredients to the recipe they are looking at.
Don't know if I've attached a screenshot properly or not, but this is an example of a recipe currently. I want to utilize a check box, so that if I need that particular ingredient I will select it. Then when I'm done reviewing the recipe, I can click on a button that will say something like Add ingredients to my Grocery list. It will take the checked items and put them on a new page... or save the list to the DB (I'm not sure which would be the best choice here). I want the user to be able to go look at as many recipes as they wish and keep adding to their list and then allow them to print. Should I take the checked items and create a new table to store the data until they are ready to print, or could I keep adding to an open page, so I don't have to create anything new in my DB.
I can do either (I think), I just want to do it the best way the first time.
Sessions would persist as long as the person doesnt break the session (spend too much time between pageloads, or close the browser).
A database solution would be a bit more intensive on server operation, but would be a more lasting solution if you foresee that being an issue.
If using the database, it would (depending on your construction) be a join table between ingredients and user, probably with a quantity count (so that you can have more than one of the same ingredient.)
Great! I have a session for each user, so I will begin building on the session and do some testing. I might be posting again since it's been three years since I've done any coding.
This topic is now closed. New replies are no longer allowed.