I have a login using sessions. Is there a way to create a new session variable (add it to the existing session) when I click on a link? I want to make it so the session variable updates everytime I click on a link. Below it shows how it lists all files in a directory and makes a hyperlink so when clicked it spits out a url variable..which is good because my other page uses that but I am doing other things that are not working with the url variable..plus less secure...so how would I create(update) a sessions variable everytime someone clicks on one of these files?
if ($handle = opendir('shows/' . $_SESSION['username'])) {
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$thelist .= '<a href="editshow.php?show=' . urlencode($file) . '">'
. htmlspecialchars($file) . '</a><br>';
}
}
closedir($handle);
}
?>
<P>Select your show to manage:</p>
<P><?php echo $thelist ?>