<?php require_once 'header.php'; ?> <div align="center"> <table width="700" border="0" cellpadding="0"> <tr> <td align="center" colspan="4"><strong>Katgorie <a href="kategorie.php?akcja=dodaj"><span class='red'>[DODAJ NOWĄ]</span></a> </strong></td> </tr> <tr bgcolor="#f87820"> <td class="tabhead" width="18" align="center"><strong>Id.</strong></td> <td class="tabhead" width="297" align="left"><strong>Nazwa </strong></td> <td class="tabhead" width="94" align="left"><strong>Data</strong></td> <td class="tabhead" width="263" align="left"><strong>Opcje</strong></td> </tr> </table> <table width="700" border="0" cellpadding="1" > <?php $sql = "SELECT * FROM kategorie"; ?> <tr width="700" class="tabval"> <td width="20" align="center"> </td> <td width="336"> </td> <td width="100" align="center"> </td> <td width="291" align="center"> <a href="kategorie.php?akcja=edytuj&id=<?php echo $row['kategoria_id']; ?>"><span class='red'>[EDYTUJ]</span></a> <a href="kategorie.php?akcja=skasuj&id=<?php echo $row['kategoria_id']; ?>"><span class='red'>[USUŃ]</span></a> </td> </tr> <?php } ?> </table> <table width="700" border="0"> <tr> <td align="left"> <?php switch ($_REQUEST['akcja']) { case 'skasuj': { $akcja=$_POST['akcja']; } { $akcja=$_GET['akcja']; $id=$_GET['id']; } if ($akcja == 'skasuj') { // kasowanie ("DELETE FROM kategorie WHERE kategoria_id = '$id';"); } { } break; case 'dodaj': { $akcja=$_POST['akcja']; $nazwa=$_POST['nazwa']; $opis=$_POST['opis']; } { $akcja=$_GET['akcja']; $id=$_GET['id']; } if ($akcja == 'dodaj') { if ($nazwa && $opis && $data) { $query = "INSERT INTO kategorie ( kategoria_id, kategoria_nazwa, kategoria_opis, kategoria_data) VALUES (null, '$nazwa', '$opis', '$data');"; } } break; case 'edytuj': { $edytuj=$_GET['akcja']; $id=$_GET['id']; } if ($edytuj == 'edytuj') { // dodawanie rekordu if ($nazwa) { $query = "UPDATE kategorie SET kategoria_nazwa='$nazwa', kategoria_opis='$opis' WHERE kategoria_id='$id'"; } } { $nazwa = $rekord[1]; $opis = $rekord[2]; //echo '<br>'; //echo "<table>"; //echo '<form method="post">Edytuj:'; // echo '<input type="hidden" name="akcja" value="edytuj"><table>'; } break; } } ?> </td> </tr> </table> <?php require_once 'footer.php'; ?> </div>
wszystko pieknie wczytuje to texarea ale jak wezme zapisz zmiany to nic nie zapisuje

dlaczego
