View Single Post
Old 05-10-2006, 02:21 PM  
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
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"); 
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote