CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [SOLVED] Redirect between two different pages

Print topic Send  topic

Author Message
miglio

Posts: 7
Posted: 04/23/2010, 3:01 AM

Hi all,
I now that someone else has already write about this problem and I've already see the solution, but I'm not able to find the solution.
This is the solution
  
//Custom Code @2-1360E090  
if(CCGetSession("GroupID") == "")  
{  
header("Location: login.php");  
}  
elseif (CCGetSession("GroupID") == 1)  
{  
header("Location: group_one.php");  
}  
elseif(CCGetSession("GroupID") == 2)  
{  
header("Location: group_two.php");  
}  
//End Custom Code  

I've the Login.ccp and 2 menu: admin_menu.ccp users_menu.ccp
Now where I should implement the code()?

I've tried to :
1) add Before Show event to admin_menu.ccp and add the code, but it didn't work.
2) add Before Initialize event to admin_menu.ccp and add the code, but it didn't work.

NB: The Login form has how ReturnPage = menu_admin.ccp

Help me please!

mattia
View profile  Send private message
datadoit
Posted: 04/23/2010, 5:50 AM

Always use 'exit' after using a header() call. Otherwise, code
execution will continue until a flush is encountered.

header("Location:YourPage.php"); exit;
miglio

Posts: 7
Posted: 04/23/2010, 6:13 AM

thanks, I've solved..
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 04/25/2010, 7:12 AM

miglio
Please add [Resolved] or [Solved] in your thread title. Thanks.
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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