I m trying to access my session variable in backbone template which render with underscore.js
template : _.template(template)
i am working on login module . after login i set session in backend with php , which is working fine. session is started.
on success is set username with js, but it get vanish if someone refreshed the page so in case of refresh i bring up session variable.
Now i want to show session data in my template like
<li><a href="#" id="loginUser"><?php isset($_SESSION['username'])? echo $_SESSION['username']; ?></a></li>
but i am not getting those value ?
any help
thanks in advance