Alright so I am making a script for my site to easily update.
I need to know if there is a way to make it when you add a line in a file it doesn't delete the line that is under it IE:
$pdata5 = "<a href=\"$pgname\">$poettitle</a> -- $poetauthor<br><br>";
$op = fopen('header2.txt', "r+a");
fputs($op, $pdata5);
fclose($op);
and header2.txt contains like 5 lines in it
1: BLah blah
2: blah blah
3: blah blah
4: blah blah
5: blah blah
How would I make it to where it would do this
1: new content
2: BLah blah
3: blah blah
4: blah blah
5: blah blah
6: blah blah
and i have tried changing this code to ever way i post.
$pdata5 = "<a href=\"$pgname\">$poettitle</a> -- $poetauthor<br><br>";
$pdata5 = "\n<a href=\"$pgname\">$poettitle</a> -- $poetauthor<br><br>\n";
$pdata5 = "<a href=\"$pgname\">$poettitle</a> -- $poetauthor<br><br>\n";
$pdata5 = "\n<a href=\"$pgname\">$poettitle</a> -- $poetauthor<br><br>";";
and It still does the same thing except it also will delete the line under it. Any help would be appreciated Thank you.
-FrosT