ich dank dir, aber irgenwie komm ich doch net wirklich weiter.
Also, dat ist mein Code:
for($i=1; $i<count($HTTP_POST_VARS); $i++)
{
if ($HTTP_POST_VARS['surname'.$i]=="")
{
break;
}
$querypp="INSERT INTO person VALUES ('";
$querypp.="0','"; //auto inkrement
$querypp.="0','"; //$person_ID
$querypp.="0','"; //$paper_ID
$querypp.="0','"; //$contact_ID
$querypp.=$HTTP_POST_VARS['surname'.$i];
$querypp.="','";
$querypp.=$HTTP_POST_VARS['name'.$i];
$querypp.="','";
$querypp.=$HTTP_POST_VARS['email'.$i];
$querypp.="','";
$querypp.=$HTTP_POST_VARS['institution'.$i];
$querypp.="','";
$querypp.="0','";
$querypp.="0','";
$querypp.="0";
$querypp.="')";
$querypp.=";";
print $querypp;
}
Jetzt soll, wenn der nächste Teil ausgeführt wird, die ID gleich eingetragen werden:
for($i=1; $i<count($HTTP_POST_VARS); $i++)
{
if ($HTTP_POST_VARS['surname'.$i]=="")
{
break;
}
$queryat="INSERT INTO author VALUES ('";
$queryat.="0','"; //auto inkrement
$queryat.="0','"; //$person_ID
$queryat.="0','"; //$paper_ID
$queryat.="0','"; //$contact_ID
$queryat.=$HTTP_POST_VARS['pcMember'.$i];
$queryat.="','";
$queryat.="0"; //registration
$queryat.="');";
print $queryat;
}
while ( list ( $key, $value ) = each ( $HTTP_POST_VARS ) ) {
echo "<b>$key</b> : $value<br>";
}
mysql_query($queryat)
or die("<b>Query at failed!</br>");
muss ich nicht vorher submitten?