SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    create shortlist from search results

    Hi,

    I wonder if anyone can help, i have spend hours look but havent found what im after.

    I have a site that users can search to bring up a list of items on a search results page, now I would like the user to be able to click an "add to shortlist" link beside each record to add that particular item to a seperate shortlist page.

    I dont require the user to have a login in for this, i thought it would store the info in cookies.

    Im not sure how to achieve this, can anyone help.


    thanks
    Last edited by Mrb1972; Oct 18, 2007 at 03:12.

  2. #2
    SitePoint Addict
    Join Date
    Aug 2007
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just store the row into the cookie (set_cookie), and then on the other page just get all rows in the cookie from the database to display

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, thats for the reply

    when you say row, do you mean all the data for that record or could i just record the record's ID and use that to display the data on the other page.

    also as the user could add many items to a shortlist do i need to use cookie arrays?

    thanks

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Couple of ways to achieve this:

    1/ cookies - store the id of the property in the cookie either as an array or as a delimited string eg: 1|4|6|8 etc
    then use those variables on another page to query the database.

    2/ sessions - create a session for the user and store the id's in that array.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


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
  •