Hello Everyone..!!
I am beginner at PHP. I would like to have solution for "\n" in textfile php.
$file = "testFile.txt";
$fh = fopen($file, 'a+') or die("can't open file");
$firstname = $_POST["prenom"];
$lastname = $_POST["nom"];
$mood = $_POST["humeur"];
$datestring = date("d/m/y ");
$timestring = date("H.i.s");
$data = "$firstname ; $lastname ; $mood ; $datestring : $timestring "\n" ";
fwrite($fh, $data);
fclose($fh);
Actual Result:
testprenom ; testnom ; bonne ; 19/10/12 : 11.09.23
; ; ; 19/10/12 : 11.09.25
Expected Result:
testprenom ; testnom ; bonne ; 19/10/12 : 11.09.23
Thanks a lot for your time in advanced.