Hi,
I am not completely sure if this is what you are looking for, but eh.. Assuming you just want to be able to refer to entries in one table, using an id from an other table:
Each table has a unique identifier, ID, which are not the same, but just make sure you can identify a specific record in each table. <Yeahyeah, you want the same, we'll get there soon>
Then in locations, you add a field, called nameID. Here you store the ID from table persons.
So, you get the id from persons: Select id as personID from persons where <some criterium>.
Then you insert the data into location:
Insert into location (nameID, location) values ($personID, $locatoin)
Hope it helps,
J.