<?php
//Verbindung zur Datenbank
// So kannst Du es auch machen. Ist halt übersichtlicher und sauberer!
$insert ='INSERT
INTO
"'.$tabellenname.'"
SET
´name´ = "'.mysql_real_escape_string($_POST['name']).'",
´id´ = "'.mysql_real_escape_string($_POST['id']).'",
´C2´ = "'.mysql_real_escape_string($_POST['C2']).'",
´C3´ = "'.mysql_real_escape_string($_POST['C3']).'",
´C4´ = "'.mysql_real_escape_string($_POST['C4']).'",
´C5´ = "'.mysql_real_escape_string($_POST['C5']).'",
´C6´ = "'.mysql_real_escape_string($_POST['C6']).'",
´C7´ = "'.mysql_real_escape_string($_POST['C7']).'",
´C8´ = "'.mysql_real_escape_string($_POST['C8']).'",
´C9´ = "'.mysql_real_escape_string($_POST['C9']).'",
´C10´ = "'.mysql_real_escape_string($_POST['C10']).'",
´C11´ = "'.mysql_real_escape_string($_POST['C11']).'",
´C12´ = "'.mysql_real_escape_string($_POST['C12']).'",
´C13´ = "'.mysql_real_escape_string($_POST['C13']).'",
´C14´ = "'.mysql_real_escape_string($_POST['C14']).'",
´C15´ = "'.mysql_real_escape_string($_POST['C15']).'",
´C16´ = "'.mysql_real_escape_string($_POST['C16']).'",
´C17´ = "'.mysql_real_escape_string($_POST['C17']).'",
´C18´ = "'.mysql_real_escape_string($_POST['C18']).'",
´C19´ = "'.mysql_real_escape_string($_POST['C19']).'",
´C20´ = "'.mysql_real_escape_string($_POST['C20']).'",
´C21´ = "'.mysql_real_escape_string($_POST['C21']).'",
´C22´ = "'.mysql_real_escape_string($_POST['C22']).'",
´C23´ = "'.mysql_real_escape_string($_POST['C23']).'",
´C24´ = "'.mysql_real_escape_string($_POST['C24']).'",
´C25´ = "'.mysql_real_escape_string($_POST['C25']).'",
´C26´ = "'.mysql_real_escape_string($_POST['C26']).'",
´C27´ = "'.mysql_real_escape_string($_POST['C27']).'",
´C28´ = "'.mysql_real_escape_string($_POST['C28']).'",
´C29´ = "'.mysql_real_escape_string($_POST['C29']).'",
´C30´ = "'.mysql_real_escape_string($_POST['C30']).'",
´C31´ = "'.mysql_real_escape_string($_POST['C31']).'",
´C32´ = "'.mysql_real_escape_string($_POST['C32']).'",
´C33´ = "'.mysql_real_escape_string($_POST['C33']).'",
´C34´ = "'.mysql_real_escape_string($_POST['C34']).'",
´C35´ = "'.mysql_real_escape_string($_POST['C35']).'",
´C36´ = "'.mysql_real_escape_string($_POST['C36']).'",
´C37´ = "'.mysql_real_escape_string($_POST['C37']).'",
´C38´ = "'.mysql_real_escape_string($_POST['C38']).'",
´C39´ = "'.mysql_real_escape_string($_POST['C39']).'",
´C40´ = "'.mysql_real_escape_string($_POST['C40']).'",
´C41´ = "'.mysql_real_escape_string($_POST['C41']).'",
´C42´ = "'.mysql_real_escape_string($_POST['C42']).'",
´C43´ = "'.mysql_real_escape_string($_POST['C43']).'",
´C44´ = "'.mysql_real_escape_string($_POST['C44']).'",
´C45´ = "'.mysql_real_escape_string($_POST['C45']).'",
´C46´ = "'.mysql_real_escape_string($_POST['C46']).'",
´C47´ = "'.mysql_real_escape_string($_POST['C47']).'",
´C48´ = "'.mysql_real_escape_string($_POST['C48']).'",
´C49´ = "'.mysql_real_escape_string($_POST['C49']).'",
´C50´ = "'.mysql_real_escape_string($_POST['C50']).'",
´C51´ = "'.mysql_real_escape_string($_POST['C51']).'",
´C52´ = "'.mysql_real_escape_string($_POST['C52']).'",
´C53´ = "'.mysql_real_escape_string($_POST['C53']).'",
´datum´ = "'.mysql_real_escape_string($datum).'"
';
if(!$result = mysql_query($insert))
{
or die(mysql_error());
}
else
{
$num_rows = mysql_num_rows($result);
echo 'Es wurden "'.$num_rows.'" Daten eingetragen!';
}
?>