wrote php that connects the data between tables