473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Session Problems - I have not slept in days ... Please HELP



I have an ASP page that sends a location variabe to the database and
retrieves the appropriate corresponding data. I would like to add a
simple password to open this page.
The page is accessed by selecting a location which opens the page via
a links such as:

http://dir-w2k/equiplist/search/CRL....cation=BRN_101
http://dir-w2k/equiplist/search/CRL....cation=BRN_102
http://dir-w2k/equiplist/search/CRL....cation=BRN_103
Here's the Problem:

After validating the password the page loads as:
http://dir-w2k/equiplist/search/CRL.ASP instead of

http://dir-w2k/equiplist/search/CRL....cation=BRN_101

How can I add a password protection that will check the password first
then continue to search for the original selected variable
(Location=BRN_101)and return data.

I've been at this for three days and need someone with fresh eyes
The actual page code is as follows:

<%@ LANGUAGE=VBSCRIPT %>
<%
Response.Buffer = True
STATUS = Request("STATUS")
PASSWORD = Request("PASSWORD")

If STATUS = "CHECKEM" Then
If PASSWORD = "12345" THEN
Session("PASSWORDACCESS") = "Yes"
End If
End If

If Session("PASSWORDACCESS") <> "Yes" Then
%>
<HTML>
<BODY bgcolor="#FFFFFF">
<form method="POST" action="CRL4.asp">
<BR>
<BR>
<BR>
<div align="center"><center><p><input type="password"
name="PASSWORD" size="10"><br>
<input type="hidden" value="CHECKEM" Name="STATUS" >
<input type="submit" value="Login"></p>
</center></div>
</form>
</BODY>
</HTML>
<%
Response.End
End If
%>
<HTML>
<BODY bgcolor="#FFFFFF">
<%
Dim SQLFrom, SQLWhere, SQLQuery

SQLFrom = "SELECT * From Inventory_Database Where "

SQLWhere = Request.QueryString("Location")

SQLWhere = SQLFrom & " Room_Code Like " & "'" &
Replace(Request.QueryString("Location"), "'", "''")
& "%' Order By Building"
SQLQuery = SQLWhere
rsList.Open SQLQuery, Conn

%>

<%If (Not rsList.EOF)Then

response.write ("<font size=8 color=#800080 face=Arial>" &
rsList("Building") & "&nbsp;" & rsList("Room Number")) %>


<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="95%" align="center" colspan="6">&nbsp;</td>
</tr>
<tr>
<td width="20%" align="center">&nbsp;</td>
<td width="15%" align="center">&nbsp;</td>
<td width="15%" align="center">&nbsp;</td>
<td width="15%" align="center">&nbsp;</td>
<td width="15%" align="center">&nbsp;</td>
<td width="15%" align="center">&nbsp;</td>
</tr>
<tr>
<td width="20%" align="center"><b>
<font size="4" face="Arial"
color="#800080">Equipment</font></b></td>
<td width="15%" align="center"><b>
<font size="4" face="Arial"
color="#800080">Brand</font></b></td>
<td width="15%" align="center"><b>
<font size="4" face="Arial"
color="#800080">Model</font></b></td>
<td width="15%" align="center"><b>
<font size="4" face="Arial" color="#800080">Serial
Number</font></b></td>
<td width="15%" align="center"><b>
<font size="4" face="Arial" color="#800080">Procurement
TAG</font></b></td>
<td width="15%" align="center"><b>
<font size="4" face="Arial" color="#800080">Replacement
Lamp</font></b></td>
</tr>

</table>
</center>
</div>
<%
While (Not rsList.EOF)
%>

<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="20%" align="center"><% response.write ("" &
rsList("Equipment") & "") %>&nbsp;</td>
<td width="15%" align="center"><% response.write ("" &
rsList("Brand") & "") %>&nbsp;</td>
<td width="15%" align="center"><% response.write ("" &
rsList("Model") & "") %>&nbsp;</td>
<td width="15%" align="center"><% response.write ("" &
rsList("Serial Number") & "") %>&nbsp;</td>
<td width="15%" align="center"><% response.write ("" &
rsList("UofS Procure TAG") & "") %>&nbsp;</td>
<td width="15%" align="center"><% response.write ("" &
rsList("Lamp Model") & "") %>&nbsp;</td>
</tr>
</table>

<%
rsList.MoveNext
Wend

Else response.write ("<font size=5 color=#800080 face=Arial>There is
no audiovisual inventory assigned to this room.")
%>
<BR><BR>
<%
response.write ("<A href=""" & ("CRL2.asp?location=" &
Request.QueryString("Location") & "")& """><font size=4 color=#800080
face=Arial>Return")

End If
%>

</BODY>
</HTML>
Jul 19 '05 #1
0 1206

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: bonehead | last post by:
I'm still a novice when it comes to session security issues. The problems I'm trying to solve may be fairly common, but I haven't seen examples of solutions in any of the books I've looked at. I...
9
by: leke | last post by:
Hi, I am trying to learn PHP but am having some problems getting my code running in Explorer 6. <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?>...
1
by: gfuller | last post by:
- We have 2 aspx pages in a .NET project. The first sets a session variable and has a button that when clicked performs a 'redirect' to the second page which then reads the session variable. ...
1
by: gfuller | last post by:
- We have 2 aspx pages in a .NET project. The first sets a session variable and has a button that when clicked performs a 'redirect' to the second page which then reads the session variable. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.