Ciao io ho fatto così
Codice PHP:
<?php
require("config_news.php");
if ($_POST['sign'] == FALSE) {
echo " <form action=\"firma.php\" method=\"POST\">\n";
echo " [b]• Titolo *[/b] <input type=\"text\" name=\"titolo\">
\n";
echo " [b]• News *[/b] <textarea name=\"news\" cols=\"35\" rows=\"10\"></textarea>
\n";
echo " <input type=\"hidden\" name=\"sign\" value=\"true\">\n";
echo " <input type=\"submit\" value=\" Inserisci \">\n";
echo " </form>\n";
} else {
@mysql_query("INSERT INTO news (`id`, `titolo`, `news`)
VALUES ('', '" . $_POST['titolo'] . "',
'" . $_POST['news'] . "',
'" . $_SERVER['REMOTE_ADDR'] . "');");
echo "News inserita
";
}
@mysql_close();
?>
Ma mi dice news inserita ma non me la inserisce nel db come mai??