I would like to use 1 data entry form on my website to collect data and send it to two tables in HeidiSQL, but I don't know how to do it!
I have tried the following:
Try 1 -
$sql = "INSERT INTO bookings(CustomerEmail,DJName,DatePerformance,VenueName,Town)
VALUES('$CustomerEmail','$DJName','$DatePerformance','$VenueName','$Town')";
$sql = "INSERT INTO venue(VenueName) VALUES('$VenueName')" ;
This didn't work as the second $sql code 'cancelled' the first
Test 2 -
$sql = "INSERT INTO bookings(CustomerEmail,DJName,DatePerformance,VenueName,Town) VALUES('$CustomerEmail','$DJName','$DatePerformance','$VenueName','$Town')"."INSERT INTO venue(VenueName) VALUES('$VenueName')" ;
I tried using the . to concatenate both but this didn't work at all.
I'm new to web development so I've hit a wall.
Thank you