By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & 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

P: 1
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>
  2.  
  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"> <%
  5.  
  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
  17.  
  18.  
  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
  23.  
  24.                 wend
  25.                 end if
  26.  
  27.  
  28. if type="Admin" then
  29.  
  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
Share this question for a faster answer!
Share on Google+

Post your reply

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