I am very new to PHP.. Please let me know which part will be saved in Client PC and Which part will be saved in Server?

$_SESSION['name'] = 'John';

Recommended Answers

All 3 Replies

Nothing will be permanently saved in either place. There is a variable called $_SESSION[], which is an array, and you are setting the key "name" to the value 'John'. It will have the value 'John' while the php script is executing (unless you change it further down in code). This is all happening server-side. Nothing is happening on the client computer.

commented: Nice +1

^ Thanks! For the Explanation!

Nice and easy explanation. I can't add anything to it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.