473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_1 01)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=VBSCRI PT %>
<%
Response.Buffer = True
STATUS = Request("STATUS ")
PASSWORD = Request("PASSWO RD")

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

If Session("PASSWO RDACCESS") <> "Yes" Then
%>
<HTML>
<BODY bgcolor="#FFFFF F">
<form method="POST" action="CRL4.as p">
<BR>
<BR>
<BR>
<div align="center"> <center><p><inp ut 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="#FFFFF F">
<%
Dim SQLFrom, SQLWhere, SQLQuery

SQLFrom = "SELECT * From Inventory_Datab ase Where "

SQLWhere = Request.QuerySt ring("Location" )

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

%>

<%If (Not rsList.EOF)Then

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


<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#1 11111" width="100%">
<tr>
<td width="95%" align="center" colspan="6">&nb sp;</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="#1 11111" width="100%">
<tr>
<td width="20%" align="center"> <% response.write ("" &
rsList("Equipme nt") & "") %>&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>Ther e is
no audiovisual inventory assigned to this room.")
%>
<BR><BR>
<%
response.write ("<A href=""" & ("CRL2.asp?loca tion=" &
Request.QuerySt ring("Location" ) & "")& """><font size=4 color=#800080
face=Arial>Retu rn")

End If
%>

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

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

Similar topics

6
2883
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 currently have a page called 'login.php' which requires the user to provide a userid/password combination. If the user logs in successfully (i.e., the supplied userid/password combination is in the mysql database), the user is directed to a page...
9
2049
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>'; ?> </body>
1
2727
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. Problem: This always works fine on the localserver and through the IDE. But when the application is put onto a www website, the following occurs; - If you browse to the site using the IP address, session variables work fine
1
264
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. Problem: This always works fine on the localserver and through the IDE. But when the application is put onto a www website, the following occurs; - If you browse to the site using the IP address, session variables work fine
0
9384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8645
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6473
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5247
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2612
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.