Hello :),
I really think the using the session thingy to sort of track the user is pretty cool so what I need to know is how to use session ...
Thanks :)
Printable View
Hello :),
I really think the using the session thingy to sort of track the user is pretty cool so what I need to know is how to use session ...
Thanks :)
Take a look at the tutorials on PHP.net
These have all of the functions that you need to know to use sessions.
Hope this helps.
Thanks thetestingsite - i will be reading the page for some time :)
Ok I have completely lost it ! - i can not understand... can anyone here please give me begginer to advanced explanation here ?
Thanks :)
Basically, you can use $_SESSION just like any other array, so long as you session_start() on each page before sending any data.
Please remember i am a stupid begginer and need more than that :)
That was the short answer. The long answer is the link that thetestingsite posted :)
Starts the session.PHP Code:session_start();
Closes the sessionPHP Code:session_destroy();
Writes "value" into "name"PHP Code:$_SESSION['name'] = 'value';
Retrieves the value of "name"PHP Code:$data = $_SESSION['name'];
Changes the session IDPHP Code:session_regenerate_id();
Gets the session IDPHP Code:session_id();
Deletes the value of 'name'PHP Code:unset($_SESSION['name']);
Thanks for your posts :), may i have an example ?
Pleeeeeeeease :)
I can see why you have 298 posts :rolleyes:Quote:
Originally Posted by blastingpcbrains
Here's one example:
index.php
somepage.phpPHP Code:<?php
session_start(); //Starts the session
$_SESSION['hello'] = 'Hello! This is "saved" session data. :)';
//Writes the value of "hello" to the session file.
?>
:)PHP Code:<?php
session_start(); //Starts the session
echo $_SESSION['hello']; //Writes the data of 'hello'
?>