session id is a cookie.
I am using session to save the information about a shopping cart. and in every page, i will display how many items in the shopping cart. I want this value to be updated as I add or remove items from the cart. I can use session value or cookie here.
session_start() will expire the page? so if i use the session, next time i visit this page, due to the page expired, it will display the new value. But if i use cookie, if i don't expire that page using header, then i may get old cookie value displayed when next time i revisit this page.