Siemka mam problem oto on zrobilem se kod do edycji dzialu info i tak gdy zmieniam tersc wpisuje nowa, zapisuje i sie nic nie zapisuje w tym zecz jest ze zostawia starą treść a nei daje nowej ...
<?
function strony_edit() {
global $PHP_SELF, $id, $op, $goto,$tytul,$text,$dodal; $query = "SELECT * FROM info WHERE id=$id";
$text = $r['text'];
$tytul = $r['tytul'];
echo '<form name="form_4" method="post" action="index.php?cmd=strony_up"> <table align="center" border="0" cellspacing="3" cellpadding="0">
<tr>
<td align="right" valign="top" class="uni_01">tytuł</td>
<td class="next">
<input type="text" name="tytul" size="35" value="'.$tytul.'">
</td>
</tr>
<tr>
<td align="right" valign="top" class="uni_01">zawartość</td>
<td class="next">
<textarea name="text" cols="55" rows="7">'.$text.'</textarea>
</td>
</tr>
<tr>
<td align="right" valign="top" class="uni_01"> </td>
<td class="next">
<input style="font-weight: bold;" type="submit" name="ok" value="zapisz">
<input type="reset" name="Reset" value="wyczyść">
</td>
</tr>
</table>
</form>
';
}
function strony_up() {
global $PHP_SELF, $id, $text, $tytul, $op;
$query1 = "UPDATE info SET tytul='$tytul', text='$text' WHERE id=$id";
echo '<br />Informacje zaaktualizowane'; }
?>