This topic is locked

Userid not available on advanced search page

12/29/2009 9:16:36 AM
PHPRunner General questions
S
seanduffy author

If I call the $_SESSION["UserID"] or paste {$username} into my advanced search page it does not display - it is just blank. It displays fine however on the list page.
Is there a way of altering the code so I can display the username on this page?

Sergey Kornilov admin 12/29/2009

Many ways to do so.

  1. Insert PHP code snippet and use the following code:

echo $_SESSION["UserID"];


2. Insert {$username} anywhere on the page. Use the following code in BeforeProcess event of the search page:

global $xt;

xt->assign("username", htmlspecialchars($_SESSION["UserID"]));


More info:

http://www.xlinesoft.com/phprunner/docs/smarty_templates.htm