CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Can I add a variable global to the site and use it to filter all lists

Print topic Send  topic

Author Message
Allen Patrick
Posted: 07/02/2002, 2:46 PM

I would like to have a variable called org_id that is global throughout the
website, that is initialized on login. If the user is not logged in org_id
would be zero. If the user is logged in the org_id variable would be set to
whatever org_id is in their login table. I want to use this variable to
filter a lot of the lists that display on the web site. Does anyone know
the best way to accomplish this. BTW I am using mysql and php.
Thanks

RonB
Posted: 07/02/2002, 3:01 PM

Modify the login procedure to declare a session variable roganisation (by
adding org_id to the select part of the login sql and using the
CCSetSession("organisation",$org_id)) and use this variable with the
CCGetSession function in your sql statements. You can use the querybuilder
and specify the session parameter.

Ron

"Allen Patrick" <al@nugen.com> schreef in bericht
news:aft6vi$cgi$1@news.codecharge.com...
> I would like to have a variable called org_id that is global throughout
the
> website, that is initialized on login. If the user is not logged in
org_id
> would be zero. If the user is logged in the org_id variable would be set
to
> whatever org_id is in their login table. I want to use this variable to
> filter a lot of the lists that display on the web site. Does anyone know
> the best way to accomplish this. BTW I am using mysql and php.
> Thanks
>
>

DonB
Posted: 07/02/2002, 3:30 PM

The normal security mechanisms that CCS provides does this. There are three
variables, UserID, USer Login, and groupID. Look at the Project Settings,
Advanced settings on the main toolbar of the IDE.


"Allen Patrick" <al@nugen.com> wrote in message
news:aft6vi$cgi$1@news.codecharge.com...
> I would like to have a variable called org_id that is global throughout
the
> website, that is initialized on login. If the user is not logged in
org_id
> would be zero. If the user is logged in the org_id variable would be set
to
> whatever org_id is in their login table. I want to use this variable to
> filter a lot of the lists that display on the web site. Does anyone know
> the best way to accomplish this. BTW I am using mysql and php.
> Thanks
>
>


   


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

MS Access to Web

Convert MS Access to Web.
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.