Username Session variable KT_Username(MM_Username)
(February 12, 2002)
Using the stock phakt code I couldn't request the session variable KT_Username on subsequent pages, this shows you the easy fix.
Normally when you use a server models login behaviour in ultradev it creates some code which creates a session variable if the login was sucsessful, this can be used to filter things on subsequent pages.
In ASP the session variable is called MM_Username and in PHP it is called KT_Username.
This worked fine for me in ASP but not PHP, I couldn't seem to retrieve the session variable KT_Username on subsequent pages and spent ages looking for the answer, I also noticed that several other people were having the same problem, the answer is simple.
Make sure this code:
<?php
session_start();
?>
is on any and every page where you want to retrieve the session variable KT_Username.
Bill Chalmers
Started doing sites in Frontpage about 3 years ago, progressed to ASP, Linux/Mysql, and PHP/MYSQL, currently learning LDAP, XML, XHTML, ASP.net, learning more about css, worked in Hammersmith Hospital for 8 years, Developed
www.hammersmithresearch.com
www.cafenetix.com
www.hammersmithcafe.org
Also developed the Trusts Intranet site with lots of php/asp applications built in, content management, enjoy getting paid for mucking about with stuff I do as a hobby.
User Reviews
Total of 3 reviewsSomething to be aware if usinh PHP on a Windows platform
Written by Mark Pawson on April 19, 2002If you experience problems that new SID's are being created after using phakt / impakt code then this may prove a solution. - Thanks to Cirstoiu & the Interakt team for providing prompt feedback to all emails sent whilst discovering the ...
OK????
Written by Bill Chalmers on March 18, 2002While this is true the stock restrict access to page and other built in user authentication features do request the stock variable name so it may be wise to use this unless you are doing your own hand coding and want to explicitly create your own ...
Session Variable Username
Written by Andrew Watson on March 18, 2002Just a wee point, The session variable username is only called MM_Username if you use the stock UD login behaviour, its not generic to ASP, it can be called anything in the whole wide world.... <%= ...







