File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,24 @@ An OO-PHP class to easily handle sessions
1212 Include or autoload the XSession.php file, then use as follows..
1313
1414 ``` php
15- use solutionstack\XSession
15+ use solutionstack\XSession;
16+
1617 //create A session
1718 $s = new XSession(string session_name, int session_lifetime_in_secs);
19+
1820 //add session data as needed
1921 $s->put("foo", "bar"):
20- $->put("user_email", "mail@example.com");
22+ $s ->put("user_email", "mail@example.com");
2123
2224 ```
2325 ## In other pages u need to use (check/resume) the session, just do..
2426
2527 ``` php
2628 //use the same session name used in starting the session
2729 $s = new XSession(string session_name);
28- if($s->resume()) { //session was succesfully resumed
30+
31+ if($s->resume()) { //session was succesfully resumed
32+
2933 //do stuff for authenticated users
3034 //also get previously set session values, or set new one
3135 $email = $s->get("user_email");
@@ -36,9 +40,10 @@ An OO-PHP class to easily handle sessions
3640
3741 ``` php
3842 //use the same session name used in starting the session
43+
3944 $s = new XSession(string session_name);
4045 $s->end();
41- }
46+
4247
4348 ```
4449 ### And Thats it.
You can’t perform that action at this time.
0 commit comments