note 116843 added to reserved.variables.session
| From: | Tugrul | Date: | Mon, 09 Mar 2015 17:04:51 +0000 |
| Subject: | note 116843 added to reserved.variables.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201901@lists.php.net to get a copy of this message | ||
Creating New Session
==========================
<?php
session_start();
/*session is started if you don't write this line can't use $_Session global variable*/
$_SESSION["newsession"]=$value;
?>
Getting Session
==========================
<?php
session_start();
/*session is started if you don't write this line can't use $_Session global variable*/
$_SESSION["newsession"]=$value;
/*session created*/
echo $_SESSION["newsession"];
/*session was getting*/
?>
Updating Session
==========================
<?php
session_start();
/*session is started if you don't write this line can't use $_Session global variable*/
$_SESSION["newsession"]=$value;
/*it is my new session*/
$_SESSION["newsession"]=$updatedvalue;
/*session updated*/
?>
Deleting Session
==========================
<?php
session_start();
/*session is started if you don't write this line can't use $_Session global variable*/
$_SESSION["newsession"]=$value;
unset($_SESSION["newsession"]);
/*session deleted. if you try using this you've got an error*/
?>
Reference: http://gencbilgin.net/php-session-kullanimi.html
----
Server IP: 72.52.91.14
Probable Submitter: 95.10.83.98
----
Manual Page -- http://php.net/manual/en/reserved.variables.session.php
Edit -- https://master.php.net/note/edit/116843
Del: integrated -- https://master.php.net/note/delete/116843/integrated
Del: useless -- https://master.php.net/note/delete/116843/useless
Del: bad code -- https://master.php.net/note/delete/116843/bad+code
Del: spam -- https://master.php.net/note/delete/116843/spam
Del: non-english -- https://master.php.net/note/delete/116843/non-english
Del: in docs -- https://master.php.net/note/delete/116843/in+docs
Del: other reasons-- https://master.php.net/note/delete/116843
Reject -- https://master.php.net/note/reject/116843
Search -- https://master.php.net/manage/user-notes.php