Posted by Floortje on 03/29/07 15:04
angelduran2004@hotmail.com schreef:
> hi. since i'm new to php i don't know how to store data in sessions.
> for example, suppose the user clicked on a link (e.g. "link1"), now
> the user clicks on another link (e.g. "link2"). Now, how do i store
> the data ("link1" and "link2") of what the user has been clicking or
> viewing as the user goes along my site? if you could post some
> example code it would be great. thank you for your time.
>
session_start();
$_SESSION['pages_visited'][]=$_SERVER['REQUEST_URI'];
foreach ($_SESSION['pages_visited'] as $page)
{
echo 'history: <a href = "'.$page.'">'.$page.'</a><br>';
}
--
Arjen
http://www.hondenpage.com
[Back to original message]
|