Question : Why can't I pull the from variable from this form? ASP classic

I need to pull the value of the text field "passwordvar" from this form. Before I added the login feature it worked fine but now it doesn't. As you can tell from the code it should write the value of Request.Form("passwordvar") at the top of the page. Can anyone tell why this is not working?

Thanks

An example of the page is here:
http://www.glowfishtw.com/TOD/admin/login2.asp

and here is the code:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!--#include file="../Connections/ondemand.asp" -->
<%
Dim logintest
Dim logintest_numRows

Set logintest = Server.CreateObject("ADODB.Recordset")
logintest.ActiveConnection = MM_ondemand_STRING
logintest.Source = "SELECT * FROM usersvar"
logintest.CursorType = 0
logintest.CursorLocation = 2
logintest.LockType = 1
logintest.Open()

logintest_numRows = 0
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("uservar"))
If MM_valUsername <> "" Then
  MM_fldUserAuthorization=""
  MM_redirectLoginSuccess="TODadmin_category.asp"
  MM_redirectLoginFailed="login2.asp?fail=yes"
  MM_flag="ADODB.Recordset"
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_ondemand_STRING
  MM_rsUser.Source = "SELECT uservar, passwordvar"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM usersvar WHERE uservar='" & Replace(MM_valUsername,"'","''") &"' AND passwordvar='" & Replace(Request.Form("passwordvar"),"'","''") & "'"
  MM_rsUser.CursorType = 0
  MM_rsUser.CursorLocation = 2
  MM_rsUser.LockType = 3
  MM_rsUser.Open
  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
    Else
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And true Then
      MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
  End If
  MM_rsUser.Close
  Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<%
Dim pvar
pvar = Request.Form("passwordvar")
response.write pvar
%>

<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
  <label>
  <input name="uservar" type="text" id="uservar" />
  </label>
  <br />
  <label>
  <input name="passwordvar" type="text" id="passwordvar" />
  </label>
  <p>
    <label>
    <input type="submit" name="Submit" value="Submit" />
    </label>
  </p>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<%
logintest.Close()
Set logintest = Nothing
%>

Answer : Why can't I pull the from variable from this form? ASP classic


If it is a SBS 2008, it means that you don't have more DCs and more exchange servers. So the restore process is in some way simple if you have the correct backup in place, you just need to make a complete recover of your server and it will be done

But the questions are... do you have a complete backup of your server and is it compatible with AD or/and Exchange? How old is the last available backup that you have? Were all the information and data in your hard drives totally lost?

Random Solutions  
 
programming4us programming4us