CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 conditional redirect in php

Print topic Send  topic

Author Message
DC
Posted: 05/05/2002, 6:16 PM

I want to load a specific page (intro.php) under the following conditions.

#1: On Login.php, after the user logs in AND if a field in the member table (field name = skipintro) equals 0. Otherwise load the page the user was trying to access and DON't open the additional window containing intro.php. What code should I place in the Login page and what event should I place it in?

#2: On the intro.php page, I will have a button (or whatever) that allows the user to "Skip the intro in the future." The button will set the value of the field "skipintro" to 1 and then close the window. What code should I use and where?

Am I approaching this the best way? Any help is appreciated.

FYI: the intro page will automatically play a streaming video (I hope). But that's to be accomplished in different post.
Nicole
Posted: 05/07/2002, 1:05 AM

Hello,
1. create Custom Login event a obtain generated code. There you'll find redirection after session vars are created. You should modify this part. First use DlookUp function to find the value of "skipintro" field of logged in user. Then depending on its value use "if" operator to redirect user to different pages.

2. Hm.. the code depends on what do you want to use.. Lets say it is 'Insert' button with modified caption. Note, that user is to be logged, otherwise you won't be able to identify it. Ok, create Before Insert and update record for logged in user.
DC
Posted: 05/07/2002, 10:46 AM


   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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