Habs nun mal grundlegend überarbeitet. Ich bekomme jetzt zwar nun keine Fehlermeldung mehr, allerdings trägt es rein gar nichts in die Tabelle der Datenbank ein!
<?php
include "config.php";
error_reporting(E_ALL);
$tabelle = "spieler";
if (isset($SUBMIT)) {
mysql_connect($host, $user, $password) or die ("Keine Verbindung.");
mysql_select_db("$database") or die ("Die Datenbank ist nicht da.");
$eintragen = "INSER INTO '".$tabelle."' VALUES ('".$_POST["spielername"]."',
'".$_POST["team"]."',
'".$_POST["formation"]."',
'".$_POST["taktik"]."',
'".$_POST["verbindung"]."',
'".$_POST["spielweise"]."')";
$eintragen = mysql_query($eintragen) or die (mysql_error());
}
echo "<form action=\"index.php?section=ins_player\" method=\"POST\">";
echo " <fieldset>";
echo " <legend>Formular</legend>";
echo " <table>";
echo " <tr>";
echo " <td></td>";
echo " <td></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"spielername\">Spielername:</label></td>";
echo " <td><input type=\"text\" name=\"spielername\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"team\">Team:</label></td>";
echo " <td><input type=\"text\" name=\"team\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"formation\">Formation:</label></td>";
echo " <td><input type=\"text\" name=\"formation\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"taktik\">Taktik:</label></td>";
echo " <td><input type=\"text\" name=\"taktik\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"verbindung\">Verbindung:</label></td>";
echo " <td><input type=\"text\" name=\"verbindung\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td><label for=\"spielweise\">Spielweise:</label></td>";
echo " <td><input type=\"text\" name=\"spielweise\"></td>";
echo " </tr>";
echo " </table>";
echo " <input type=\"submit\" name=\"SUBMIT\" value=\" Speichern \">";
echo " <input type=\"reset\" value=\" Felder leeren \">";
echo " </fieldset>";
echo "</form>";
?>