tags:

views:

49

answers:

1

I'm trying to find the best way to use cookies for saving some products (wishlist).

I want to use it to set the product_id into cookie.

What would be the best option to use? jQuery cookie plugin or PHP cookies ?

+4  A: 

Better to set on the server with PHP if you want to go for maximum compatibility as you cannot guarantee that a given user has JavaScript enabled on their browser. However, if you mandate JavaScript use in your site I find the jQuery plugin a lot more convenient to use.

Wolfwyrd
Thx alot, i choose to use PHP, i MUST be sure that the users can add their products to wishlist, and i only have a little time to finish my project.
william