Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Integrating with PayPal Creating Paypal Buttons

Question about persistence?

Hello Randy,

First I would like to say. You are amazing. You are really good at teaching. Thank you very much for being so awesome.

Question: I would like to understand persistence. So how does pay pal maintain the session. Is it per IP for a certain amount of time? What if I switch to different browser (on the same machine with same IP) or a different machine. I am pretty sure a new cart would be created. What I am looking for is a little bit more explanation on how pay pal maintains the sessions?

Regards, Nawaz.

3 Answers

Nawazikram Mohammed - Sessions are in short the answer here. To make the session data persistant you will need to store the session data as a cookie perhaps. There are different ways to store the session data, such as cookies or in databases. Take a closer look at the php.net docs Here

It is a lot of data to take in, but should give you a great overview of what is happening in most cases.

Unfortunately, Randy has left the Treehouse team. I'll bet [Hampton Paulk](http://twitter.com/@[Hampton Paulk](https://teamtreehouse.com/hamptonpaulk) would take PHP questions.

Thank you Hampton. Read few lines from the link. It starts to make sense. Will read thoroughly and let you know if I have any questions.

Regards, Nawaz.

Pleas do. We need to cover sessions more in depth.