Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Login Screen</title>
- <script type="text/javascript">
- function fct()
- {
- var txtPassword = document.getElementById('txtPassword').value;;
- if (txtPassword.length < 1) {
- alert('Please enter a valid password!');
- return;
- }
- var txtUser = document.getElementById('txtUsername').value;
- if (txtUser.length < 1) {
- alert('Please enter a valid Username!');
- return;
- }
- var txt = "You have to create a module called i.e. CheckDB.asp, which would connect\n";
- txt+="to your Database using i.e. ADO and asp issuing a SQL statement like: \n\n";
- txt+="SELECT count(*) FROM tblUser WHERE username='" ;
- txt+=document.getElementById('txtUsername').value;
- txt+= "' AND password='";
- txt+=document.getElementById('txtPassword').value;
- txt +="';\n\n";
- txt +="The result set should evaluate to greater zero!";
- alert(txt);
- }
- </script>
- </head>
- <body style="height:300px;width:300px">
- <hr style="width:300px;text-align:left"/>
- <!--form id="frmLogin" action="CheckDB.asp"-->
- <form id="frmLogin">
- <table>
- <tr>
- <td>User Name: </td>
- <td><input type="Text" id="txtUsername"/></td>
- </tr>
- <tr>
- <td>Password: </td>
- <td><input type="Password" id="txtPassword"/></td>
- <tr>
- <td></td><td style="text-align:center"><input type="submit" value="Submit" onclick="return fct();"/></td>
- </tr>
- </table>
- </form>
- <hr style="width:300px;text-align:left"/>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement