Hi,
Ich will das aber $times mal machen. Z.B. für $times = 4 entspräche VALUES (1,2), (1,2), (1,2), (1,2)
Nun weiß ich aber nicht wie. Statt foreach versuche ich mich nun anfor ($i=0; $i<=$_POST['times']; $i++ ) {
$sql = ...
}Ist syntaxtechnisch natürlich auch wieder falsch ;)
Na ja, du solltest $sql dabei nicht in jedem Durchgang ueberschreiben, sondern einen Wert anhaengen.
for statt foreach ist schon mal eine gute Wahl, wenn du etwas eine bestimmte Anzahl mal machen willst.
Den Wert von $_POST['times'] solltest du dann aber noch auf Vorhandensein und Gueltigkeit pruefen, sonst kann das auch huebsch krachen an der Stelle.
MfG ChrisB
--
„This is the author's opinion, not necessarily that of Starbucks.“
„This is the author's opinion, not necessarily that of Starbucks.“