![]() |
![]() |
-kefir- |
![]() ![]()
Post
#1
|
Goście ![]() |
Problem jest następujący: Udało mi się zrobić skyrpt do zapisywania wiadomości do pliku i wyświetlania go jakos stronke html (do newsow od siebie uzylem znacznika <br>). Problem jest w tym, ze nie wiem jak zrobic, aby stary news byl na dole, a nowy na gorze. Pomozcie! To źródła moich skryptów:
system.html <body bgcolor=black> <font color=pink> <form method="POST" action="test.php"> Wpisz treść newsa: <br> </font> <textarea rows="18" cols="60" name="nowy_news"></textarea> <br> <input type="submit" value="Wyślij"><input type="reset" value="Wyczyść"> </form> ----------------------------------------------------------------------------------------------- test.php <?php $fp=fopen('test.txt','a'); fputs($fp,$_POST['nowy_news']."<br>"); fclose($fp); ?> <a href=index.php>obejz newsy</a> <a href=system.html>dodaj newsa</a> ------------------------------------------------------------------------------------------------ index.php <html> <head> </head> <body bgcolor=black> <font color=red> <?php print (file_get_contents ("test.txt")); ?> <p><a href="/system.html">Wpisz newsa</a></p> </font> </body> </html> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 22:21 |