Is there any php script redirect logged in customer to a product page

Discussion in 'PHP' started by ketting00, Jun 11, 2011.

  1. #1
    Hi,

    I am looking for a PHP script that redirects a logged in customer to a product page they had discovered on my website.

    I have a product page that anyone can see it but only a logged in visitor can see the order details of that specific item.

    However, how can I redirect a logged in customer to that specific page of the product they've just visited without going to a user account page first? Is there any PHP script to achieve this? I mean it will look like the feature on Amazon shopping cart.

    A suggestion of any keyword for search is welcomed, I've tried different keyword but not success yet.

    Thanks
     
    ketting00, Jun 11, 2011 IP
  2. 812402

    812402 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you have an id on each of the products you can make a new value in the table in your database (name it something like "recent_product") and every time someone visits a product, the id is changed. When they login again, make the script connect to the database and find the id and then redirect them to that page.

    Hope this helps. If you PM me the code for the page you want to redirect on, I can modify it for you.
     
    Last edited: Jun 11, 2011
    812402, Jun 11, 2011 IP