468,470 Members | 1,651 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,470 developers. It's quick & easy.

whether i try to redirect from a html page to asp page or an asp to an asp page in IE

I think the there is error in the post method that is not working. I am trying to open another asp page with an asp page login.asp whose code is

Expand|Select|Wrap|Line Numbers
  1. <html> <head><title>Helpers Management Desk</title></head> <marquee bgcolor="light red" behavior="scroll" loop="150" scrollamount="15"><font face="" color=white><h1>Helpers Management Desk</h></font></marquee> <body bgcolor=yellow > <form id="form1" method="POST" action="http://bytes.com/log.asp"> <center><table></center> <tr style="margin-top:10px;"></tr> <td align=right>Enter  your UserName:</td> <td align=left style="margin-top;20px;"><input type="text" name="username" size="20"><BR></td> </tr> <tr style="margin-top:40px;"></tr> <td align=right>Enter your Password:</td> <td align=left><input type="text" name="password" size="20" colspan=10><BR></td> </tr> </table> <center align=right><input type="Submit" value="Login"></center> </form> </body> </html>
  3. and the code of the redirected page log.asp is as follows:-
  4. <html> <head> <title>Sitting Plan</title> </head> <body bgcolor="#FF9933" background="lblue161.jpg"> <%
  6. Set lv_flow = Server.CreateObject("ADODB.Connection")
  7. lv_flow.Open "DSN=nikhil;Description=;Server=local;DATABASE=nikhil" 
  8. Set cmd_flow = Server.CreateObject("ADODB.Command")
  9. Set rs_flow = Server.CreateObject("ADODB.Recordset")
  10. cmd_flow.CommandText = "SELECT user_name,pass,type from help"
  11. cmd_flow.CommandType = 1
  12. 'Set cmd_flow.Connection = lv_flow
  13. 'rs_flow.Open cmd_flow, ,1,2
  14. user=request.form("username")
  15. pass=request.form("password")
  16. dim f=0
  19.              while not rs_flow.eof
  20.                    if rs_flow("user_name") <> user or rs_flow("pass") <> pass then
  21.                     response.write("Login Error")
  22.                     rs_flow.movenext
  24.                 wend
  25.                 end if
  28. if type="Admin" then
  30.         Response.write 100
  31.              else
  32.      Response.write 101
  33.      end if 
  34.      %> </body> </html>

Please friends tell me the programming error that persits and I am unable to solve. HELP!!

Thanks in advance
Aug 30 '14 #1
0 1215

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Bruce W..1 | last post: by
1 post views Thread by steggun | last post: by
8 posts views Thread by Darrel | last post: by
5 posts views Thread by humair77 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.