Plik do wpisywania i wyswietlania kontakt.php
<link rel="stylesheet" type="text/css" href="style.css"> <link REL="stylesheet" HREF="style2.css" TYPE="text/css"> <html> <body> <div class="news"> <ul> <li class="naglowek">Zapytaj</li> <li class="tresc"> <form method="post" action="index.php?wyslij"> Imie i Nazwisko: <input name="nick" type="text" /><br /> Pytanie teamat: <input name="temat" type="text" /><br /> E-mail: <input name="mail" type="text" /><br /> Strona www: <input name="www" type="text" value="http://" /><br /> Pytanie treść:<textarea name="pole" cols="30" rows="6"></textarea><br /> <input type="submit" name="b12" value="Zapytaj" /><input name="wyczysc" type="reset" value="Wyczyść" /> <br><br> </form> </li> </ul> </div> <? foreach($file as $key => $value) { } ?>
Plik wyslij.php
<?php $dataloc="komenty.txt"; $nick = $_POST['nick']; $mail = $_POST['mail']; $www = $_POST['www']; $temat = $_POST['temat']; $pole = $_POST['pole']; $wynik = $nick . '|||' . $mail . '|||' . $www . '|||' . $temat . '|||' . $pole . "\n $fileread"; $plik ="komenty.txt"; ?><br><br>