CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Redirect page

Print topic Send  topic

Author Message
syah

Posts: 29
Posted: 03/27/2009, 12:22 AM

i had a problem where when user click link, it will link either add_restaurant page and login page....if the user not already login, when user click the restaurant link it will go to login page...if the user is already login,it will go to add_restaurant page...how i can do that?

this code i add in link before show events


global $Redirect;
global $DBmyData;

if (CCGetUserID()))
{
$Redirect = "add_restaurant.php";
}
else
{
$Redirect = "login.php";
}
View profile  Send private message
Gena

Posts: 591
Posted: 03/27/2009, 12:33 AM

Why do you do this manually (and wrong too)???

1. your link to go just to add_restaurant page
2. on your add_restaurant page set "Restricted Property" to yes and select appropriated Groups. Set "Access Denied" Property - Specify the page on which the unauthorized user is redirected, it's your login page.


_________________
Gena
View profile  Send private message
syah

Posts: 29
Posted: 03/28/2009, 8:27 AM

thanks a lot...
i have done this perfectly......
i don't need to do a coding but just only setting at the properties...

thnks Gena :-)
View profile  Send private message
Gena

Posts: 591
Posted: 03/28/2009, 8:49 AM

sure, exactly!
_________________
Gena
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.