add variables to session after user login
Hi there,
I'm trying to add variables to the session (from a form) after user login and on a subsequent page (that is retaining the session) - currently I'm using the following after the page's restrict access behaviour (but obviously this isn't working) -
<?php
@session_start();
if(isset($_POST['submit'])) {
$_SESSION['$hrrng'] = trimStripHsc($_POST[“herringbone”]);
header('Location:https://www.********************.php');
?>
the header location redirect works but can't echo new variables on this next page - currently using following for that -
<?php echo htmlspecialchars($_SESSION['$hrrng']); ?>
many thanks in advance