You can find the ut on this page here
Click here
-------------------------------------
Here is a simple session tutorial. First, sessions are things stored on the server, therefor, the person cannot see them unless you print it. Here are how you use this.
First off
- You must put session_start(); at the beginning of every page that you will use sessions in! (Make sure it is inside the php tags)
- You use this syntax:
<?php
$_SESSION['session_name'] = "SESSION CONTENT";
?>
NOTE: Sessions must be made at the VERY top of a file, before ANYTHING is sent to the viewers browser, OR it will NOT work... but you can access them at any time.
- Accessing a session is easy. Just like this...
<?php
echo "The content of a session is $_SESSION['session_name']";
?>
So, if the content of the session 'session_name' was CONTENT, on the screen you would see:
The content of a session is COTNENT
NOTE: If you are using echo ''; and not echo ""; you will need to put { and } around the session when printing it, example:
<?php
echo 'The content of a session is {$_SESSION['session_name']}';
?>
- The session ID is something to identify the current session, it doesn't store any of the actual sessions content. So, to delete all sessions by that person, you need to use this:
<?php
session_destroy();
$_SESSION = array();
setcookie ('PHPSESSID', '', time-300, '/', '', 0);
?>