Thanks for your input.
I can get the reference number returned and printed if I don't do another query first.
I have tried to set a variable to take the data into, so that I can re-use it later on.
$guestquery =("INSERT INTO Guests VALUES ('$Guest_ID','$surname','$initials','$address1','$address2','$postcode','$tel_no', '$email_addy')");
$bookingquery =("INSERT INTO Bookings VALUES ('$BOOKING_ID','$Guests_Guest_ID','$NO_OF_NIGHTS','$DATE_FROM','$DATE_TO','$NO_OF_PEOPLE')");
$refID=mysql_insert_id();
echo "this is my ref: $refID";
but this doesn't give me the value, just returns zero.
I am obviously missing something here. ...
In the code above, I am setting $refID to equal the mysql_insert_id() value (I think??) can I then use the $refID as value for input in the third table.
As you can tell I am very new to this, so don't really know what I am doing.
Cheers
Harlequeen