From 2533f052068ed2f49a459ebf3d364dc8047b99b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baha=20=C5=9Eener?= <34012215+BMathers35@users.noreply.github.com> Date: Wed, 7 Dec 2022 21:46:14 +0300 Subject: [PATCH] Update README.md --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 34f6907..9e9c11b 100644 --- a/README.md +++ b/README.md @@ -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. +```