The following is my code:
<?php
#put the info the user just inputed into a file for later retrival
file_put_contents("test.txt",$_POST, FILE_APPEND);
?>
And this is the result I get in test.txt:
JaneF16xyzWindows1215
How can I change the format of the result to be
Jane,F,16,xyz,Windows,12,15
(have commas between the elements)
Change it to
file_put_contents('test.txt', implode(',', $_POST), FILE_APPEND);
Note that this does not consider the possibility of array post values.