Path: csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Ecommerce site - how? Date: Sun, 25 Jun 2017 16:03:14 +0200 Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net MrkiMW4lY1zbVyMAG25BWwre2MmKswSlt84in9fL6eJZgOn60g Cancel-Lock: sha1:gFobuVzd8Rp2DF0HGG2Cb8AmyKM= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.lang.php:17478 On 06/25/17 15:30, R.Wieser wrote: > Bit, > >> What does this cookie look like? eg. what=what inside the cookie file? > > All that the cookie needs to contain is a unique session number (to both > identify the current connection as well as connect the entries in that > database you mentioned with you). The session id do not need to be used in database, I don't see much of point of storing anything in the database until the user decides to pay. >> If it's id'ing you by IP address - what happens if you log off your >> internet connection, and somebody else logs on, and gets your IP? Using IP as an identification is a bad idea, just think of someone using their mobile phone, those will have a proxy ip number, which means that quite a lot of users at the same time has the same ip. As earlier pointed out, a session will be unique, see http://php.net/manual/en/book.session.php for more information and do not use setcookie() nor setrawcookie() as in those cases the data is stored in the browser and the data has to be seen as tampered. -- //Aho