Forum Moderators: coopster
Suppose you have a product view page. On that page you have a link that says "add to favourites" and points to addToFavourites.php, passing the product id as a parameter. When the user clicks the link, addToFavourites.php takes the product id and the user id then adds both to the table in your database as a new row.
You'd also need a corresponding viewFavourites.php which queries the database table for all product ids from rows that have this user id.
It's pretty straightforward in principle but you should find something that works with whatever other packages you're using. If the site's all custom then your favourites script will be too.