The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
So, unless I edit the news data to turn the tables around everytime I enter some news it will stay the same.
Is there a script I can enter to flip the tables around or so that next time I enter some news in it enters it into the top instead of the bottom? thanks.
news script: http://membres.lycos.fr/enterthefog/update/news.php
touch("news.txt");
} else {
I think thats what he means.
The original script posts the new news at the bottom instead of at the top, which isn't good.
http://membres.lycos.fr/enterthefog/update/news.php
> ooops! didnt put in the 'else' statement
Where???
--------------------
print "
Submit News
";if ( isset($actionflag) && $actionflag == "join")
{
if ( ! file_exists("news.txt") ) {
touch("news.txt");
} else {
$fp = fopen( "news.txt", 'r' );
$Existing_File = fread($fp, filesize('news.txt'));
fclose($fp);
}
$fp = fopen( "news.txt", 'w' );
fwrite ( $fp, "
| "); fwrite ( $fp, "$form[subject] " ); fwrite ( $fp, "Posted by $form[author] " ); fwrite ( $fp, "$form[text]" ); fwrite ( $fp, " |
fputs ( $fp, $Existing_File);
print "News Sent!";
fclose($fp);
}
if ( isset($clearflag) && $clearflag == "clear")
{
unlink("News.txt");
touch("News.txt");
print "Database reset!";
}
?>
-----------
try that
Though I think it would be better to right just the data values, without the HTML Tags in, as if you wanted to change the layout of your site, you'd have to go though the while file.