php session get data 1

php session get data


Here is what the above code is Doing:
1. The first line of the code starts the session.
2. The second line checks if the session variable ‘views’ is set. If it is, then the session variable ‘views’ is incremented by 1.
3. If the session variable ‘views’ is not set, then it is set to 1.
4. The last line prints the value of the session variable ‘views’.

Similar Posts