Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
BMathers35 authored Dec 7, 2022
1 parent c61d07e commit 2533f05
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
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.
```

0 comments on commit 2533f05

Please sign in to comment.