mam kod :
index.php
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <title>New Page 2</title> </head> <body> <?php echo '<form action="" method="post"> <center> <p><select name="pole1" size="20"> <option>asddsadsad</option> <option>sdsadsa</option> <option>dssadsad</option> <option>sdasdsa</option> <option>dasdda</option> </select> <p>Stan licznika.</p><textarea name="pole2" style="width: 200px; height: 100px;"> </textarea><br /> <p><textarea name="pole5" cols="20" rows="1"></textarea> <input type="submit" value="Zapisz" /> </form></center>'; } else { $dane = $pole1."`".$pole2.$pole3."`".$pole4."`".$pole5."`". "\n"; $file = "baza.txt"; } ?> </body> </html>
I
poglad.php
<html> <head> <meta http-equiv="Content-Language" content="pl"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <title>New Page 2</title> </head> <body> <table border="1" width="939" height="346"> <tr> <td height="47" width="230">Pajda - 1</td> <td height="45" width="320">pajda 2</td> <td height="44" width="367">pajda 3</td> </tr> <tr> <td height="289" width="230"> <?php foreach($file as $value) { } ?></td> <td height="291" width="320"><?php foreach($file as $value) { } ?></td> <td height="292" width="367"><?php foreach($file as $value) { } ?></td> </tr> </table> </body> </html>
www.pajda-wolsztyn.eu.php
I teraz moje pytanie jest następujące skąd pod tabela jest "1" ?
I chce zrobić, że jak naduszę guzik to all z "baza.txt" się wyczyści.
Pozdrawiam