$qryp2="INSERT INTO `cleopark`.`t_reservation` (
'$grand_tot', here i want to get the id of the second table to use it
$qryp1="INSERT INTO `cleopark`.`personal` (
'$country', here i want to get the id of the first table to use it
all i need is to get the id of the first table and display it in the second table in slect * query
i need to display the second id in the first table
I don't see the point of having two tables if you are doing a 1 for 1 linking between rows in the tables. If this is the design then why don't you just make it one table. You are going to have redundant data regardless.
A better way to do it would be to take the personal information, check to see if it is already in the database (from a previous transaction) and use that ID in your reservation table.
If a reservation can have more than one 'personal' data row then you would need an intersection table between the two tables to handle the many-to-many relationship.