Chuck Barnett <mailto:[EMAIL PROTECTED]>
    on Friday, May 14, 2004 10:42 AM said:

> Anyone have any code snippits that would allow me to do a "Last 3
> Items Viewed" like on ebay?

no but i can give you a suggestion as to a method...

each time someone views an item do a first-in-last-out rotation of a
cookie.

in other words.. each time you come to a page do the following: (pseudo
code)

COOKIE['item3'] = COOKIE['item2'];
COOKIE['item2'] = COOKIE['item1'];
COOKIE['item1'] = $new_value;

then you go back and read the three items and you're done.


hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to