Craig H
|
| Posted: 03/21/2002, 6:40 AM |
|
Hi
i have a problem where as i have a database with a login, once logged in i see a search page with a full list of the database below (which is fine)
however above the search box/details i want to show the user who he is logged in as, i want to be able to include this in the header file
can this be done via CC
thanks
Craig
|
|
|
 |
Nicole
|
| Posted: 03/21/2002, 6:46 AM |
|
Craig,
the solutions are different for template and templateless versions.
Here is sample for PHP:
- non template pattern. To header or footer section of Header page put the display variable code
<?=$name ?>
in Open event of header page put the code to look up the name of logged in user
if (get_session("UserID") != "")
{
$user_name = dLookUp("user_table", "user_name", "user_id=". ToSQL(get_session("UserID"), "Number"));
$name = "Hello ". $user_name. "!";
}
- template pattern. To header or footer section of Header page put the display variable code
{name}
in Open event of header page put the code to look up the name of logged in user
if (get_session("UserID") != "")
{
$user_name = dLookUp("user_table", "user_name", "user_id=". ToSQL(get_session("UserID"), "Number"));
$tpl->set_var("name","Hello ". $user_name. "!");
}
|
|
|
 |
|