CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Databases In Header

Print topic Send  topic

Author Message
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. "!");
}

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.