Quote:
|
Originally Posted by MickeyG
get rid of the \n when your appending to the file it already goes to the end of the file. The only time you need \n is if your appending multiple lines
|
If I do that, this
line2
line3
...
becomes:
line2line3
...
Using this code:
PHP Code:
$FileName = $path."/lists/names.php";
$list = file($FileName);
$list[$line] = $_POST["name"]."|^|".$_POST["newpass1"]."|^|".$email."|^|";
$FileName = $path."/lists/newnames.php";
$FilePointer = fopen($FileName, "w+");
for ($x=0;$x<=$numnames;$x++){
fwrite($FilePointer,$list[$x]);//."\n"
}
fclose ($FilePointer);
unlink($path."/lists/names.php");
rename($path."/lists/newnames.php",$path."/lists/names.php");