CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 CCS - Redirect after successfull login PHP

Print topic Send  topic

Author Message
Jean-François ROY
Posted: 10/22/2002, 9:55 AM

Hi,

I'm trying to redirect to another page after a successful login using
CCStudio. What are the steps I should follow or where can I simply enter the
name of the page to point to after a successful login.

Thank you,

Jean-François

Michael Rachow
Posted: 10/23/2002, 12:40 AM

Hi Jean-François,

usually you wouldn't login explicitly.

You "select the page you would like to visit.
If the security level of the current user does not correspont with the level
of the page (or you are not loged in at all) your are forced to the login
screen. By default after login you are routed to just that page.

Michael

"Jean-François ROY" <jfroy@wanadoo.fr> schrieb im Newsbeitrag
news:ap3vu1$cfe$1@news.codecharge.com...
> Hi,
>
> I'm trying to redirect to another page after a successful login using
> CCStudio. What are the steps I should follow or where can I simply enter
the
> name of the page to point to after a successful login.
>
> Thank you,
>
> Jean-François
>
>

CarlosCR
Posted: 10/30/2002, 4:03 AM

function Login_DoLogin_OnClick() { //Login_DoLogin_OnClick @3-AFF8EBF1

//Login @4-1C5B8B18
global $Login;
if(!CCLoginUser($Login->login->Value, $Login->password->Value))
{
$Login->Errors->addError("Usuario o Contraseña incorrecta.");

CCSetSession("UserID", "");
$Login->password->SetValue("");
return false;
}
else
{
global $Redirect;

// echo $Login;
$conn = new clsDBespadelada();
$grupo = CCGetDBValue("SELECT nivel_seg FROM usuarios WHERE
usuario='".$Login."'", $conn);

switch ($grupo) {
case 0:
$Redirect = "login.php";
break;
case 1:
$Redirect = "/nivel1/inicio1.php";
break;
case 2:
$Redirect = "/nivel2/inicio2.php";
break;
case 3:
$Redirect = "/nivel2/inicio2.php";
break;
case 4:
$Redirect = "/nivel2/inicio2.php";
break;
}


// $Redirect = "gest_actividades.php";


// $Redirect = CCGetParam("ret_link", $Redirect);

return true;
}
//End Login

} //Close Login_DoLogin_OnClick @3-FCB6E20C
"Jean-François ROY" <jfroy@wanadoo.fr> wrote in message
news:ap3vu1$cfe$1@news.codecharge.com...
> Hi,
>
> I'm trying to redirect to another page after a successful login using
> CCStudio. What are the steps I should follow or where can I simply enter
the
> name of the page to point to after a successful login.
>
> Thank you,
>
> Jean-François
>
>

Jean-François ROY
Posted: 10/30/2002, 6:59 AM

Thank you Mike,

I finally figured it out. It's much better programming practice not to login
explicitly but I didn't know how CodeCharge worked the issue. Now It's
working fantastically thanks to you.

Thank you for your help,

Sincerely,

Jean-François


"Michael Rachow" <mrachow@BeraCom.de> a écrit dans le message denews:
ap5jq5$9et$1@news.codecharge.com
...
> Hi Jean-François,
>
> usually you wouldn't login explicitly.
>
> You "select the page you would like to visit.
> If the security level of the current user does not correspont with the
level
> of the page (or you are not loged in at all) your are forced to the login
> screen. By default after login you are routed to just that page.
>
> Michael
>
> "Jean-François ROY" <jfroy@wanadoo.fr> schrieb im Newsbeitrag
>news:ap3vu1$cfe$1@news.codecharge.com...
> > Hi,
> >
> > I'm trying to redirect to another page after a successful login using
> > CCStudio. What are the steps I should follow or where can I simply enter
> the
> > name of the page to point to after a successful login.
> >
> > Thank you,
> >
> > Jean-François
> >
> >
>
>


   


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.