So would the adults submit work something like this???
Obviously i will have to but a few lines in to connect to the DB but..
I have added a random number generator for now to make the transaction Number...
$randomgen = mt_rand() . "\n";
echo mt_rand(10);
$transaction_no = "$randomgen";
$numAdults = $_POST['adults'];
$numKids = $_POST['kids'];
if ($numAdults != 0) {
for ($i = 0; $i < $numAdults; $i++) {
// create an adult ticket
mysqli_query($connect,"INSERT INTO tickets (ticket_type, transaction_no)
VALUES ('$i','$transaction_no')");
}
}