-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c61d07e
commit 2533f05
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# php-session | ||
Session management with PHP Class. | ||
|
||
## **Start()** | ||
Starts sessions. It works the same as the session_start() function. | ||
|
||
###### **Start() Example:** | ||
``` | ||
$Session = new Session(); | ||
$Session->Start(); | ||
``` | ||
|
||
## **Create($name, $value)** | ||
Allows you to create or set a session value. | ||
|
||
###### **Create() Example:** | ||
``` | ||
$Session = new Session(); | ||
$Session->Start(); | ||
$Session->Create('test', 'This is a test message.'); | ||
``` | ||
|
||
## **Get($name)** | ||
Lets you call the session value you created. | ||
|
||
###### **Get() Example:** | ||
``` | ||
$Session = new Session(); | ||
$Session->Start(); | ||
$Session->Create('test', 'This is a test message.'); | ||
$test = $Session->Get('test'); | ||
echo $test; | ||
``` | ||
###### **Get() Result:** | ||
> This is a test message. | ||
## **Delete($name)** | ||
Allows you to delete the session value you created. | ||
|
||
###### **Delete() Example:** | ||
``` | ||
$Session = new Session(); | ||
$Session->Start(); | ||
$Session->Create('test', 'This is a test message.'); // We create a new value. | ||
$Session->Delete('test'); // We delete the value we created. The "test" value will no longer work. | ||
``` |