I want to have this script which receives a POST from another PHP script to append the contents (username in this case) to a file called passwords.txt which already exists in the same directory as this script. The print is there to check that the POST is successful (it is). Here's the code:
</html>
<body>
<?php
$indo=$_POST["username"];
$handle=fopen('/usr/share/phpMyAdmin/passwords.txt',"a");
print($_POST["username"]);
fwrite($handle, $indo);
fclose($handle);
?>
</body>
</html>