954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

$_SESSION['name'] = 'John'; What does it mean? Please explain!

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';
edn_781
Newbie Poster
10 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

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.

cscgal
The Queen of DaniWeb
Administrator
19,432 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 230
 

^ Thanks! For the Explanation!

edn_781
Newbie Poster
10 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

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

rotten69
Posting Whiz
346 posts since May 2011
Reputation Points: 3
Solved Threads: 16
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: