frankalbers
Programmer
Hello there and Happy New Year!
I'm trying to write some code in PHP that should put several sets of data from one HTML form into a MySQL database. It works pefectly fine when I do it with one set but I do not know how to do it with multiple ones. My code for the single set entry:
$query = "INSERT INTO bank VALUES (NULL, '$date','$cheq' ,'$supplier' ,'$purchaser' , '$int_invoice_no', '$invoice_no')";
And my unsuccessful one on the multiple sets:
while ($in>0 OR $out>0)
{
$query = "INSERT INTO bank VALUES (NULL, '$date','$cheq' ,'$supplier' ,'$purchaser' , '$int_invoice_no', '$invoice_no', '$in', '$out')";
}
If anybody ever had this kind of problem bevore please help me out!
Regards,
Frank
I'm trying to write some code in PHP that should put several sets of data from one HTML form into a MySQL database. It works pefectly fine when I do it with one set but I do not know how to do it with multiple ones. My code for the single set entry:
$query = "INSERT INTO bank VALUES (NULL, '$date','$cheq' ,'$supplier' ,'$purchaser' , '$int_invoice_no', '$invoice_no')";
And my unsuccessful one on the multiple sets:
while ($in>0 OR $out>0)
{
$query = "INSERT INTO bank VALUES (NULL, '$date','$cheq' ,'$supplier' ,'$purchaser' , '$int_invoice_no', '$invoice_no', '$in', '$out')";
}
If anybody ever had this kind of problem bevore please help me out!
Regards,
Frank