Need help writing information...
Posted: Sat Jun 14, 2003 11:47 am
Hey guys... I need help again. I have a page which i use to post news, after i submit it goes to a file that writes the information to a document which is included on the main page. The problem is, when i post new news, its added below the older news. Is there any way to tell it to write it at the top instead of the bottom?
This is what i use to write the information:
-Drachlen
This is what i use to write the information:
Code: Select all
<META HTTP-EQUIV="refresh" content="2;URL=Http://morte-satanica.cjb.net">
<?PHP
$name = $_GET['name'];
$news = $_GET['news'];
$da = date("F j, Y h:i:s A T");
$str = "<br><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width=590 bgcolor=#404040>
<TD width=550 align=left bgcolor=#363636><img src=lcor.png><font face=Verdana Color=#7F8F7F><b>Posted by: $name</TD>
<TD width=550 align=right bgcolor=#363636><font face=Verdana Color=#7F8F7F valign=top><b>$da<img src=rcor.png></TD>
<TR>
<TD colspan=2 bgcolor=#404040><font face=Verdana Color=#C9C8C1> $news</TD>
</table>";
$fp = fopen("./newslog11.html", "a+");
fputs($fp, $str);
fclose($fp);
echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TD>The news has been updated. You will be forwarded there now. If your browser doesn't send you, click <a href=http://morte-satanica.cjb.net/>here</a></table>";
?>