CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Passing variables..uhm

Print topic Send  topic

Author Message
JuRito
Posted: 01/26/2003, 3:33 PM

sorry to bother with my simple questions but..
how do i pass data from a page to another in ccs?
i mean i know how to do that with plain PHP (i'm a newbie in that too..) but in ccs the thing is still
a bit obscure for me. What i wanna do is simply include a " Hello <username>" in the header of my pages
after logging in, not really hard :)
RonB
Posted: 01/26/2003, 3:39 PM

after login a session variable called UserID is set. you can use this variable in a before show event on the labe you want to display the username with.
Something like
$mygrid_>username_label->setvalue(CCGetDBValue("select user_name from your_login_table where login_id=" .$CCGetSession("UserID",""),$DBConnection1));

Ron
JuRito
Posted: 01/27/2003, 2:31 AM

uhm.. i did create a empty grid and a label inside it named "name". i did put this custom code in a beforeShow event of the label..

$grid->$name->setvalue(CCGetDBValue("select user_login from users where user_id=" .$CCGetSession("UserID",""),$DBConnection1));

I am using the internet DB included with CCS, so i modified the query as needed, but it returns

"Fatal error: Call to a member function on a non-object"

what did i do wrong? :(
JuRito
Posted: 01/27/2003, 3:13 AM

it did work now i've been as smart as calling global variables in the custom code :\ :)

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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