Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is wrong with this code? Altho

Status
Not open for further replies.

Telsa

Programmer
Jun 20, 2000
393
US
What is wrong with this code? Although I key password in correctly, it still redirects me to my relogin (intro2)page rather than the other.


<%@ Language=VBScript %>
<% response.buffer = true %>
<%
Dim oMRST
Dim Password
Dim Username
Password = Request.form(&quot;password&quot;)
Username = Request.Form(&quot;SDTmgr&quot;)


set omrst = server.createobject(&quot;ADODB.Recordset&quot;)
Omrst.open &quot;SELECT * FROM tblPDS_users WHERE user = '&quot; & username & &quot;';&quot;, &quot;DSN=PDS&quot;

If NOT omrst.EOF AND (omrst.fields(&quot;password&quot;) = password) THEN
response.redirect &quot;pds_mgr.asp&quot;
else
response.redirect &quot;pds_intro2.asp&quot;
end if

%>
Mary :)

Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
 
First off, why not just include the password in the select statement?? Secondly, select Count(*) or just one of the columns to save on network traffic, since you aren't actually using any of the data. Try putting ()s around your Not EOF statement, I'm not sure if this is the problem. Hope this has helped... &quot;A computer scientist is a person who knows when it is time to hit the computer.&quot;

John

johnmc@mvmills.com
 
You gave me some ideas. Thanks! Mary :)

Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top