Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Using session variables in TXP
I’m running into a snag that maybe some of you TXP gurus can help me with.
I’m building a login section of my site that that defines $_SESSION[‘username’], which I want to use to have my navigation display more options if they are logged in.
I have checked that $_SESSION[‘username’] is defined, but this:
<txp:php>
session_start();
</txp:php>
in my header form before there’s any http requests and
<txp:php> if (isset($_SESSION['username'])) { echo "something"; } else {} </txp:php>
in my nav form, but nothing displays when I have username defined. Any idea what i’m doing wrong here?
Offline
#2 2009-05-15 15:37:32
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Using session variables in TXP
Hello ecklesroad
You could try ign_password_protect and mem_self_register if you are doing sites with client areas. If you just want to give admin users more bells-and-whistles on the public side you can use Ruud’s rvm_privileged plugin.
— Steve
Offline
Pages: 1