tried everything
|
| Posted: 10/28/2002, 2:00 PM |
|
I am using php4 w/ templates and am trying to make a successful redirect page that will redirect the user based on security level. First, I created a redirect page, and in the before show event, I inserted this code:
if (CCGetSession("GroupID") == 1)
header("Location: trialmenu.php");
if (CCGetSession("GroupID") == 2)
header("Location: membermenu.php");
if (CCGetSession("GroupID") == 3)
header("Location: adminmenu.php");
What happens, is, when I go to login, I don't get redirected to the page requested, instead, the redirect page opens up with the header and footer. I tried inserting the code from http://kabwebs.com/ccsniplets/sniplets_view.php?RecNo=7, which is this:
//Custom Code @28-2A29BDB7
if (CCGetSession("GroupID") == 3)
header("Location: adminmenu.php);
//End Custom Code
When I tried this and tried to publish the page, it kept on commenting everything out, so I did it without the "//Custom Code @28-2A29BDB7". This helped by not commenting everything out, but it still took me to the redirect page after logging in, without redirecting me. can anyone please help? thanks!
|
|
|
 |
Nicole
|
| Posted: 10/30/2002, 5:56 AM |
|
Hello,
You should edit the value of $Redirect variable in the loginformname_DoLogin_OnClick() function, namely under the else section:
else
{
if (CCGetSession("GroupID") ==1)
$Redirect = "page1.php";
if (CCGetSession("GroupID") ==2)
$Redirect = "page2.php";
}
|
|
|
 |
|