I have more than one problem. First one:
How can I send more than one data including JS functions:
$.ajax({
type: 'POST',
url: 'save.php',
cache: false,
data: {
bla: navigator.appVersion,
blah: navigator.platform
}
});
Second problem is connected with first one:
How can I save more than one data:
<?php
foreach($_POST['data'] as $data) {
$bla = $data['data1'];
$blah = $data['data2'];
$file = "test.txt";
$fh = fopen($file, 'w') or die("can't open file");
fwrite($fh, $bla, $blah);
fclose($fh);
}
?>