I am building a system (much like how a shopping cart would work) where someone requests information about a particular company which we then get sent an email of there chosen companies and we then send then manually send them back details of each one. they select what companies they would like to know about by clicking a button "add to cart" and each button would contain a different alue so we can tell which company is which.
We will be storing sessions via a cookie using php.
The problem we are facing is how do we write each company requested to the cookie?? - We could assign variables on each button called $company_name - but then have diffeent values on each like Macdonalds, burgerKing etc.
So if a person chooses say 3 companys we want to store it like this - how can we do that?
$company_name (this would be macdonalds)
$company_name (this would be BK)
$company_name (this would be KFC)
After we can successfully write to the cookie - they can then goto the checkout page and then get all the companies they requested i.e $company_name - shown in a list and then we will be emailed that (the emailing part i can handle)
Please please please - can someone show me how to write multiple entries with the same variable (but different value) to a cookie.
Thank you very much