Putting this in my php file writes "..." to my html file.
$contents = $mystring . "...";
$n = 1;
$accounts = array();
foreach ($_POST["accounts"] as $account) {
$accounts[] = "<strong>Account {$n}</strong><br>({$account['name']})<br>CREDITS<br>{$account['credits']}";
}
$contents .= implode("<br>-<br>", $accounts);
file_put_contents("content.html", $contents);
This is what I get now if I use var_dump$(_POST)
Object {readyState: 4, responseText: "↵array(2) {↵ ["date"]=>↵ string(58) "Sun Dec 27 … ["credits"]=>↵ string(2) "72"↵ }↵ }↵}↵", status: 200, statusText: "OK"}abort: ( statusText )always: ()complete: ()done: ()error: ()fail: ()getAllResponseHeaders: ()getResponseHeader: ( key )overrideMimeType: ( type )pipe: ( /* fnDone, fnFail, fnProgress */ )progress: ()promise: ( obj )readyState: 4responseText: "↵array(2) {↵ ["date"]=>↵ string(58) "Sun Dec 27 2015 18:35:23 GMT-0700 (Mountain Standard Time)"↵ ["data"]=>↵ array(6) {↵ [0]=>↵ array(2) {↵ ["name"]=>↵ string(28) "****@gmail.com"↵ ["credits"]=>↵ string(3) "110"↵ }↵ [1]=>↵ array(2) {↵ ["name"]=>↵ string(33) "****@gmail.com"↵ ["credits"]=>↵ string(3) "110"↵ }↵ [2]=>↵ array(2) {↵ ["name"]=>↵ string(23) "****@gmail.com"↵ ["credits"]=>↵ string(3) "536"↵ }↵ [3]=>↵ array(2) {↵ ["name"]=>↵ string(32) "****@outlook.com"↵ ["credits"]=>↵ string(3) "333"↵ }↵ [4]=>↵ array(2) {↵ ["name"]=>↵ string(19) "****@gmail.com"↵ ["credits"]=>↵ string(3) "188"↵ }↵ [5]=>↵ array(2) {↵ ["name"]=>↵ string(20) "****@gmail.com"↵ ["credits"]=>↵ string(2) "72"↵ }↵ }↵}↵"setRequestHeader: ( name, value )state: ()status: 200statusCode: ( map )statusText: "OK"success: ()then: ( /* fnDone, fnFail, fnProgress */ )__proto__: Object