jak jest to w innym pliku to wtedy dziala.
<?php
session_start();
?>
<!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <title> Dodaj Post</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../style/panel.css" /> </head> <body> <div id="header"></div> <div id="menu"> <div class="szerokosc"> <a href="#" class="menu">Ustawienia</a> <a href="add_post.php" class="menu">Dodaj News !</a> <a href="#" class="menu">Aktualnie Brak</a> <a href="#" class="menu">Aktualnie Brak</a> </div> </div> <div id="box"> <form method="GET" action=""/> <center> Tytul:<br> <input type="text" name="tytul" class="topic" size="56"><br> Treść:<br> <textarea rows="5" name="tresc" class="tresc" cols="42"></textarea><br> <input type="submit" name="submit" value="Dodaj"> <?php include("polacz.php"); if($_SERVER['REQUEST_METHOD'] == 'POST') { $query = mysql_query("insert into news values('','".$_POST['tytul']."',now(),'".$_POST['autor']."','".$_POST['tresc']."')"); } ?> </center> </form> </div> </body> </html>
prosze o pomoc