gitopmax 0 Newbie Poster

Please i need help
am newbie in asp, am trying to code a login page in which after user login
all the user information will display in the success page
i tried the following code but am not getting result. help me out pls

member.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%option explicit%>
<%
dim db 
dim filepath
dim query 
dim rec 
dim varfname
dim varuname
dim varpword
dim varphone
dim varemail
%>
<%
varfname = request.Form("fname")
varuname = request.Form("uname")
varpword = request.Form("pword")
varphone = request.Form("phone")
varemail = request.Form("email")
%>
<%
filepath = server.MapPath("pas.mdb")
set db = server.CreateObject("adodb.connection")
db.open "provider = microsoft.jet.oledb.4.0;data source ="& filepath
query = "select * from tbuser where uname = '"&varuname&"'and pword = '"&varpword&"'"

set rec = db.execute(query)


%>

<!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>
<style type="text/css">
<!--
.style1 {
    font-family: Verdana;
    font-weight: bold;
    color: #FF0000;
}
-->
</style>
</head>

<body>
<table width="728" align="center">
  <tr>
    <td height="68" bgcolor="#9900FF"><span class="style1">Good</span></td>
  </tr>
  <tr>
    <td><table width="200" align="right">
      <tr>
        <td bgcolor="#0000FF">&nbsp;</td>
      </tr>
      <tr>
        <td><% if rec.bof or rec.eof then 
response.Redirect("error.asp")
else

response.write(Request.Form("fname"))& "<br>"
response.write(" " & Request.Form("uname"))& "<br>"
response.write(" " & Request.Form("phone"))& "<br>"
response.write(" " & Request.Form("email"))& "<br>"
end if 
%>
&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

This is the login form:

<table width="352" border="1" align="center" cellspacing="0" bordercolor="#F7F7F7">
      <tr>
        <td height="178" align="center"><table width="338">
          <tr>
            <td width="17" height="116">&nbsp;</td>
            <td width="305"><form id="login" name="login" method="post" action="member.asp">
                <table width="305">
                  <tr>
                    <td height="33" colspan="2" bgcolor="#004040"><span class="style4">Login here  </span></td>
                  </tr>
                  <tr>
                    <td width="93"><span class="style19">Username</span></td>
                    <td width="200"><label>
                      <input name="uname" type="text" id="uname" />
                    </label></td>
                  </tr>
                  <tr>
                    <td><span class="style19">Password</span></td>
                    <td><input name="pword" type="password" id="pword" /></td>
                  </tr>
                  <tr>
                    <td height="21"><span class="style15"></span></td>
                    <td><input name="Submit" type="submit" value="Submit" /></td>
                  </tr>
                </table>
            </form></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style19">If not a Member/Client, <a href="index.asp">please Sign Up Here </a></span></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="34" bgcolor="#004040"><span class="style3">Copyright Reserved 2012 </span></td>
  </tr>
</table>

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.