Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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](http://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.