Formularz:
<form action="http://www.ppx.pl/balon_portfolio/admin/inc/edit_form.php?id=<?=$row["id"]?>" method=post>
<table border=0 align=center class=foot>
<tr><td>Tytul pracy:</td><td><input type=text name=title size=15 VALUE="<?=$row["title"]?>"></td></tr>
<tr><td>Adres (tmp/...):</td><td><input type=text name=adres size=15 VALUE="<?=$row["adres"]?>"></td></tr>
<tr><td>Dla kogo:</td><td><input type=text name=dla size=15 VALUE="<?=$row["dla"]?>"></td></tr>
<tr><td>Sciezka do IMG:</td><td><input type=tex name=img size=15 VALUE="<?=$row["img"]?>"></td></tr>
<tr><td></td><tr><td><input type=submit value=Edytuj></td></tr>
</table>
Skrypt:
<?
$id = $_GET['id'];
$title=$HTTP_POST_VARS['title'];
$adres=$HTTP_POST_VARS['adres'];
$dla=$HTTP_POST_VARS['dla'];
$img=$HTTP_POST_VARS['img'];
if (!$title || !$adres || !$dla || !$img || !$id)
{
echo 'Wypelnij wszystkie pola!';
}
$zapytanie = "UPDATE prace
set title = '$title',
adres = '$adres',
dla = '$dla',
img = '$img',
where id = $id";
if ($wynik)
header("Location: http://www.ppx.pl/balon_portfolio/admin/index.php?co=edit"); ?>
po nacisnieciu Edycja, pojawia sie pusta strona a dane sie nie zmieniaja... co robie zle?
pozdrawiam,
balon.