Forum Moderators: open

Message Too Old, No Replies

ASP Session Help

How to Include a Session in this Script

         

rotfil

2:51 pm on Feb 24, 2006 (gmt 0)

10+ Year Member



Hello there,

I am trying to create an Administration Panel for a Music Shop and what need is a session created here but I am not sure how to.

The reason for the session is so if by accident someone types the wrong URL they can’t see the page, and are redirected back to the the login page...
Thanks for your Help in advance.

James


<%
strStaffID=Request.querystring("fldStaffID")
strPassword=Request.querystring("fldPassword")

strSQL="select * from tblStaff where StaffID='" & strStaffID & "' and password= '"& strPassword &"'"

set conn = Server.CreateObject("ADODB.Connection")
conn.open "dsn=Oracle;uid=00000000;pwd=00000000"
Set rsPassword = conn.execute( strSQL )
'response.write(strSQL)

Do While Not (rsPassword.EOF)

response.redirect("home.htm")

objRs.MoveNext
Loop

response.redirect("loginerror.htm")

%>

<removed personal url
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 4:41 pm (utc) on Feb. 24, 2006]

rotfil

11:26 pm on Feb 24, 2006 (gmt 0)

10+ Year Member



don't worry i figured it out ;P, but thanks for looking