SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile A printable list of check boxes selected from several recipes (opinion's preferred)

    Hi all,

    I have a website that is a recipe site for my family, far and wide across the US and Europe. The DB is completely normalized (if that makes a difference in the answers I hope to get.). My code is php and javascript with some CSS, and now I want to add a feature.

    I'm thinking of adding check boxes beside the list of ingredients to the recipe they are looking at.download.jpg

    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.

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    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.)
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Member
    Join Date
    Apr 2013
    Location
    Wisconsin
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •