Hello, my problem is, that I want to make a file to htaccess like this:
user1:jqwhkqjhjka
user2:jkhkjsdhejw
user3:hqjwhkhsudu
I take the data from a database and put down to the file, as you can see, is every users on a new linie, HOW DO I MAKE IT???
I have tryed: <br> \n and chr(13), but it only wrote in the file, it will not become a new linie break.....
my file is like here:
$resultat = mysql_query("select * from mysql where id > 0");
$antal = (mysql_num_rows($resultat));
if ($antal > 0) {
while($data = mysql_fetch_array($resultat)) {
$fp = fopen ("passwords", "a");
$cryptcode = crypt($data
,base64_encode($data[code]));
fwrite ($fp, $data[name].':'.$cryptcode.chr(13));
fclose ($fp);
}}