I am trying to break the line after this code. I can't figure it out what ever I do the output of my code is just as shown below:
Output:
User: adminLogged in: 2014-02-09 05:34:30User: adminLogged OUT: 2014-02-09 05:34:36User: tataLogged in: 2014-02-09 05:34:41User: tataLogged OUT: 2014-02-09 05:34:43
I want to set some space and new line.
$date=date("Y-m-d H:i:s");
$updatefile = "userlogs.txt";
$fh = fopen($updatefile, 'a') or die("can't open file");
$stringData = "User: $username";
fwrite($fh, "$stringData");
$stringData = "Logged in: $date";
fwrite($fh, "$stringData");
fclose($fh);
– JAL Feb 09 '14 at 05:40