Code: Alles auswählen
<?php
if(isset($_POST['submit']) AND "News Eintragen" == $_POST['submit']) {
$sql = "INSERT INTO news
(Title, Text, Category, Com-Topic, Date)
VALUES
('".$_POST['Title']."',
'".$_POST['Text']."',
'".$_POST['Category']."',
'".$_POST['Com-topic']."',
NOW())";
mysql_query($sql);
echo " <p>Hinzugefügt</p>\n";
} else {
// Formular
}
?>