<form name=\"addform\" method=\"post\" action=\"panel.php?id=news_new\"> <input type=\"hidden\" name=\"act\" value=\"add\"> Temat: <input name=\"title\" type=\"text\" size=\"5\"><br> Autor: <input name=\"author\" type=\"text\" size=\"5\"><br> Treść: <textarea name=\"content\" cols=\"50\" rows=\"5\"></textarea><br> <input type=\"submit\" name=\"submit\" value=\"Akceptuj\"><br> <? if($_POST[act] != add){ } else { $sql = \"INSERT INTO `news` (date, author, content, title) VALUES\". \"(NOW(),'\". mysql_escape_string($_POST[author]).\"','\". }else{ } } ?> </div>
Dodaje do bazy wszystko, prócz treści (content). Action forma odnosi się właśnie do tego pliku.