Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP Cookies

  • 01-06-2006 10:46am
    #1
    Registered Users, Registered Users 2 Posts: 1,466 ✭✭✭


    A mate is a designer and runs a large ecommerce site in the UK, he ask me how via php it would be possible to record the last 5 pages that a customer has visited.

    Does anyone know where I can start with this ?

    I can add soemthing like

    <?php
    setcookie("Product", <ProductID><ProductName>, time()+60*60*24*30);
    ?>

    on each unique page , but from the looks of the help file this will only store the last page , as it will overwrite the cookie, ideally I want one cookie storing all product id's and names , whcih I can then use to populate a drop down.


Comments

  • Closed Accounts Posts: 169 ✭✭akari no ryu


    Why neccessarily cookies?
    Surely an array in session would be better, wherein if count($_SESSION)>5 you pop?


  • Registered Users, Registered Users 2 Posts: 1,466 ✭✭✭Smoggy


    Sounds good to me , In was going with cookies , so it would last linger than a session , but a session would work well.

    - Havent coded PHP for ages, what little I knew I have forgotten


Advertisement