L
Lukasz
PHP-Code:
Sorry war mein Fehler! hier jetzt nochmal
PHP:
<?php
echo '<form action="newComment.php?senden=1" method="post" name="entryComment">';
echo '<table border="0" cellspacing="0" cellpadding="0">';
echo '<tr>';
echo '<td><font size="1" face="Verdana,Helvetica,Arial,Geneva">Name:</font></td>';
echo '<td><input type="text" name="name" size="24"><input type="hidden" name="senden" value="1"></td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '</td>';
echo '<td><textarea name="text" rows="8" cols="55"></textarea></td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '</td>';
echo '<td align="right"><input type="submit" name="absenden" value="senden"></td>';
echo '</tr>';
echo '</table>';
echo '</form>';
include ("newssystem/config.inc.php");
if(isset($senden) or isset ($_GET[senden]) or isset ($_POST[senden])) {
$id = 1;
$datum = time();
$dataBase = "DB87590";
$connectIt = mysql_connect($dbserver,$nutzer,$passwort);
mysql_select_db($dataBase);
$insertIn = "INSERT INTO comments (name, text, zeit, newsId) VALUES ('$name', '$text', '$datum', '$id');";
$results = mysql_query($insertIn, $connectIt);
if(isset($results) or isset($_GET[results]) or isset($_POST[results])) {
echo "oki";
}
}
?>
Sorry war mein Fehler! hier jetzt nochmal
Zuletzt bearbeitet von einem Moderator: