ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 19th, 2003, 05:41 PM
Foundation Foundation is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 6 Foundation User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Redirection based on query result...?

I have a quiz that writes the results to an Access db. When the user logs in, I want it to redirect them based on their score.

I want them to login and get directed to page 2.

Page 2 queries the db based on the user/pass.

If the quizcompleted=0, they get directed to the quiz.

If the quizcompleted=1, they get directed to a page that says "You've taken the quiz and your score was _________ ."

The problem is that I am new and my PHP knowledge isn't helping me do this in ASP. Any help on how to do this would be greatly appreciated.

Reply With Quote
  #2  
Old May 19th, 2003, 10:09 PM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
put the following code into your page 2, after the login has been validated.

Code:
<% 
If validlogon Then

     Select Case rsResults("quizcompleted")
          Case 0
               Response.Redirect (address of quiz here)
          Case 1
              Response.Redirect (address of quiz completed page)
          Case Else
              'no other result
      End Select

else
     Response.Redirect (invalid logon on page)
end if

%>

You would need to either pass the quiz result as a parameter in the redirect (i.e. page.htm?QuizScore=<users score>) or re-query the database at the other page.

You could also use If....then....else statements, it's up to you.
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Last edited by mohecan : May 19th, 2003 at 10:12 PM.

Reply With Quote
  #3  
Old May 21st, 2003, 10:51 AM
Foundation Foundation is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 6 Foundation User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Edit:

Ok I got the conditional statements there and the info posted appropriately, but I ran into another problem. I'm going to post the new problem seperately since it's completely different. Thanks again!

Last edited by Foundation : May 21st, 2003 at 04:33 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Redirection based on query result...?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway