Kod:
<?php include('includes/header.php'); include('includes/menu.php'); include('includes/body_header.php'); $_GET['site'] = 1; { echo " <form method=\"post\" action=\"zmien.php\"> <textarea name=\"nazwa\" cols=\"75\" rows=\"1\"/>".$row['nazwa']."</textarea><br /> <textarea name=\"tresc\" cols=\"75\" rows=\"20\" >".$row['tresc']."</textarea><br /><br /> <input type=\"hidden\" name=\"id\" value=\"".$_GET['site']."\" /> <input type=\"submit\" value=\"Zmień\" /> </form> "; } ?>
Plik zmien.php:
<?php include('includes/header.php'); include('includes/menu.php'); include('includes/body_header.php'); if ($_POST) { $wstawka = ("UPDATE strony SET nazwa = ".$_POST['nazwa'].", tresc = ".$_POST['tresc']." WHERE id = ".$_POST['siteid']); } else { } ?>
Wywala mi
Kod
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'szkoda, że nie działa...
Co jest nie tak?