CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Display different include page depoending on varia

Print topic Send  topic

Author Message
Bib42
Posted: 07/18/2003, 6:53 AM

I found this snippet of code on the net.
if ($profile_id=1){
include('tester1.php);
}
else if ($profile_id=2){
include('tester2.php);
}

in which event would i locate this code so it shows the particular include page depending on what variable the id had. Also do i have to declare the variable 'global $profile_id' even though the variable is being passed from a previous page

I want to use this so i can have different pages for different id's
BIGB42
Posted: 07/18/2003, 6:59 AM

I use CCS with php and mysql. This is critical for my site som please help.
Headhunter
Posted: 07/18/2003, 7:05 AM

I have 3 include pages, 1 for each user group:
I just hide include pages depending on the user group.
Hope this helps

//Custom Code @34-2A29BDB7
// -------------------------
//Show header based on User Group
global $header_user;
global $header_power_user;
global $header_admin;

if((CCGetSession("GroupID",""))==2)
{
$header_user->Visible = true;
}
else
{
$header_user->Visible = false;
}
if((CCGetSession("GroupID",""))==3)
{
$header_power_user->Visible = true;
}
else
{
$header_power_user->Visible = false;
}
if((CCGetSession("GroupID",""))==4)
{
$header_admin->Visible = true;
}
else
{
$header_admin->Visible = false;
}
Bigb42
Posted: 07/18/2003, 7:29 AM

which even do you put this custome code?
Headhunter
Posted: 07/18/2003, 9:05 AM

Sorry I didn't mention it,

You have to put it in the page before show event.

   


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.