Im trying to add data to a csv file, however every time i run the php script it will add the data two or three times and that is of course super annoying! Just wondering if anyone has an idea of why this is happening? PHP Code:
$my_file2 = 'TEMP/temp.csv';
$handle = fopen($my_file2, 'a');
$data = "Mobile,".$mobi.",Message,".$message."
";
fwrite($handle, $data);
fclose($my_file2);
An example of the csv file with double entry:
</div>