I have this jquery code:
var myarr = ["aa","ss","dd"];
$.ajax({
url: "proces.php",
data: "arr="+myarr,
type: "POST",
success: function () {
alert("data is send");
}
});
I see message data is send
but in proces.php
file I have this code
$str = '';
foreach ($_POST['arr'] as $k=>$v) {
$str = $str.$v;
}
$hand = fopen("t.txt","w+");
fwrite($hand,$str);
and in file t.txt
nothing is written, please tell where I wrong ?