<?php
$pavadinimas = $_POST["pavadinimas"];
$turinys = $_POST["turinys"];
$submit = $_POST["submit"];
if ( $submit == Siusti ) {
$con = mysql_connect("localhost","username","password");
mysql_select_db("database", $con);
mysql_query("INSERT INTO news (title, new)
VALUES ('$pavadinimas', '$turinys')");
}
?>
<center>
<form name="form1" method="post" action="">
<strong>Pavadinimas:</strong><br>
<input name="pavadinimas" type="text" size="50"><br>Tekstas:<br>
<textarea name="turinys" cols="70" rows="10"></textarea><br>
<input type="submit" name="submit" value="Siusti">
</form>
</center>