Basically, is there a way for this to be done?
I'm trying to create a site where when the correct "password" is entered, it takes the user to a page. I have this all working with the following code;-
<div class="row">
<center>
<form name="login" style="margin: 0px">
<INPUT TYPE="text" NAME="pass" size="17" onKeyDown="if(event.keyCode==13) event.keyCode=9;" style="width: 152px; margin: 5px;"><br>
<input type="button" value="Click to submit!" style="width : 150px; margin: 3px" onClick="TheLogin(this.form)">
</form>
</center>
</div>
And this script:-
<script language="JavaScript" type="text/javascript">
function TheLogin() {
var password = 'Mehra';
if (this.document.login.pass.value == password) {
top.location.href="loginyes.html";
}
else {
location.href="loginno.html";
}
}
</script>
However I'm trying to get it so that if the user inputs something other than the password, it logs this data to a text file for example. So if I type "Mehra" it takes me to loginyes.html and if I type anything else such as "password", it takes me to loginno.html but creates a file called password.txt on my server.
Thanks in advance :)