I have a set of information that is passed to a php page for entry into 2 tables when a form 'submit' button is pressed . Then the information is echoed to the screen to show what info has been entered. I want to get a field from a third table by selecting the field which matches a Guest_ID just entered from the form.
I thought I would be able to do it like this:
$roomquery =("SELECT BOOKING_ID FROM Bookings WHERE Guests_Guest_ID = $Guest_ID " );
echo "Booking ID: $BOOKING_ID";
but this does not work.
Can anybody help me with this please?
Cheers