Advertisement
Guest User

Untitled

a guest
May 11th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.37 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Login Screen</title>
  4. <script type="text/javascript">
  5. function fct()
  6. {
  7. var txtPassword = document.getElementById('txtPassword').value;;
  8. if (txtPassword.length < 1) {
  9. alert('Please enter a valid password!');
  10. return;
  11. }
  12. var txtUser = document.getElementById('txtUsername').value;
  13. if (txtUser.length < 1) {
  14. alert('Please enter a valid Username!');
  15. return;
  16. }
  17. var txt = "You have to create a module called i.e. CheckDB.asp, which would connect\n";
  18.        txt+="to your Database using i.e. ADO and asp issuing a SQL statement like: \n\n";
  19.         txt+="SELECT count(*) FROM tblUser WHERE username='" ;
  20.         txt+=document.getElementById('txtUsername').value;
  21.         txt+= "' AND password='";
  22.         txt+=document.getElementById('txtPassword').value;
  23.         txt +="';\n\n";
  24.         txt +="The result set should evaluate to greater zero!";
  25. alert(txt);
  26. }
  27. </script>
  28. </head>
  29. <body style="height:300px;width:300px">
  30. <hr style="width:300px;text-align:left"/>
  31. <!--form id="frmLogin" action="CheckDB.asp"-->
  32. <form id="frmLogin">
  33. <table>
  34. <tr>
  35. <td>User Name: </td>
  36. <td><input type="Text" id="txtUsername"/></td>
  37. </tr>
  38. <tr>
  39. <td>Password: </td>
  40. <td><input type="Password" id="txtPassword"/></td>
  41. <tr>
  42. <td></td><td style="text-align:center"><input type="submit" value="Submit" onclick="return fct();"/></td>
  43. </tr>
  44. </table>
  45. </form>
  46. <hr style="width:300px;text-align:left"/>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement