session varible problem

F

farooq

Hi guys,

I’m facing some problem can u solve it.

Problem is:
I’m giving user Id and password in (Login_sess.asp) and submit it to page
(sess_test.asp). I am setting session variable (session(“Sinâ€)=â€Yesâ€) just
before redirecting to the same page, but in first time I do not received the
value of session variable when I redirect it, when I execute this process
second time or redirect it only with the page name (sess_test.asp) it
receives session value.

Can you tell me what’s the problem?
I’ve to receive session value in first time and have to redirect with
compete URL


Login_sess.asp (Page is)

<%@ Language=VBScript %>
<html><head>
<title>Login </title>
</head>
<h1 align=center>Login in Your Account </h1>
<BODY>
<form name=login method=post action=sess_test.asp >
<table width=40%>
</td></tr>
<tr><td>Password </td><td><INPUT type="text" id=txtPwd name=txtPwd ></td></tr>
</table>

<table width=40%><tr><td align=center><INPUT type="submit" value="Submit"
id=submit name=submit>
&nbsp&nbsp <INPUT type="reset" value="Reset" id=reset name=reset >
</td></table>
</form></BODY></HTML>


Sess_test.asp (file is)
<%@ Language=VBScript %>
<html><head><title>Main Page </title></head>
<body><form method=get>
<%Response.Write "session Variable =" & Session("Sin")
if Request("txtUID") <> "" then
Session("Sin")="Yes"
Response.Redirect "http://localhost/sg/sess_test.asp"
'Response.Redirect "sess_tes.asp"
end if %>
<br><A href="Login_sess.asp">Sin In</A>
</body></form>
</HTML>



regards,
farooq
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,200
Latest member
LaraHunley

Latest Threads

Top