To my knowledge you could use PHP and write it to a file in an array. Here is an example. Let's say you have a button with the id "ClickBtn" and two input tags with the id "Password" and "Username". We want to store any info in "Password" and "Username" to an Array whenever you click the button "ClickBtn". Here is what our HTML code looks like:
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- Can Be Set To Your Favored Version Of JQuery -->
<script>
function SaveToFile(){
var Username = document.getElementById("Username").value;
var PWord = document.getElementById("Password").value;
function GetFileCount(pword){
$.ajax({async: false,
type: 'GET',
url: 'SaveToDatabase.php?v=' + pword + '&uname=' + Username,
success: function(data) {
console.log(data); // What To Do When The PHP Echos Back Data
}
});
}
}
</script>
<input id="Username" placeholder="Username"></input>
<input id="Password" placeholder="Password"></input>
<button onclick="">Save</button>
</html>
Now that we have a functioning script, we are going to need a PHP script that can save the data. We would probably write something like this (Using $_GET["v"] To Retrieve The Password And $_GET["uname"] To Get The Username):
<?php
$path = __DIR__ . '/OurDataBase/MainArrayFile.txt';
$pword = $_GET['v'];
$uname = $_GET['uname'];
if(file_exists($path)){
$curarray = file_get_contents($path);
} else {
$curarray = array();
}
$curarray[$uname] = $pword;
echo $curarray;
?>
And now all you have to do is change it up to your liking! Happy password logging!
PS: If I didn't understand then I am terribly sorry for wasting your time.