Example:
Example:
<%
Sub gotoPage(startpage)
Select Case startpage
case "Manage Contents"
Session("mainpage") = "contents.asp"
Response.redirect("content
case "Manage Users"
Session("mainpage") = "users.asp"
Response.redirect("users.a
case "Account Details"
Session("mainpage") = "accdetails.asp"
Response.redirect("accdeta
case "SiteTrack"
Session("mainpage") = "sitetrack.asp"
Response.redirect("sitetra
case "Activity Logs"
Session("mainpage") = "activitylogs.asp"
Response.redirect("activit
case "Help"
Session("mainpage") = "help.asp"
Response.redirect("help.as
case else
Session("mainpage") = "welcome.asp"
Response.redirect("welcome
End select
End Sub
Userid = Replace(Request("userid"),
Session.TimeOut = 100
set rs = Server.CreateObject("ADODB
SQLStr = "Select * from admin where userid ='" & Userid & "'"
Rs.Open SQLStr, conn, 1, 1
IF Not Rs.Eof Then
IF Rs("pwd") = request("pwd") Then
call gotoPage(Rs("startpage"))
Else
Response.redirect("index.a
End IF
Else
Response.redirect("index.a
End IF
Rs.close
Conn.close
Set Rs = Nothing
Set Conn = Nothing
%>
Apply and customize this to suit your requirement.
regards
Main Topics
Browse All Topics





by: miss_weedPosted on 2003-07-14 at 00:35:39ID: 8915189
opss...forgot to inform..if possible, i juz want to use one IF ELSE or CASE decision rather than to identify the position one by one.