Thread: session
View Single Post
  #1 (permalink)  
Old July 18th, 2006, 04:58 AM
lakshmi devi lakshmi devi is offline
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default session


i am new to problem is when i create session. the value in the session is expired soon.session value is null in all the pages.this is my code
where i am validating the values entered in the textbox
dim con
set con=server.CreateObject("ADODB.Connection") strDB '' connectionstring

dim uname,pwd
Response.Write(uname&" <br>" & pwd & "<br>")

dim rs
set rs=Server.CreateObject("ADODB.Recordset") con.Execute("Select * from Adminlogin where A_Username='"&trim(uname)&"' and A_pwd='"&trim(pwd)&"' ")
    if rs.EOF then
        Response.Write("Invaid Login Details")
        Session("LoggedInUser") =rs("A_Username")
        Response.Redirect("Admin Control Panel.asp")

    end if '' end if of rs record set

this is another page's code

If Session("LoggedInUser") = "" Then
End If
session value is always null in this page.

textboxes are in default.htm page.

thanks in advance

Reply With Quote