Hi,
The simplest answer is a mysqli multi-line query:
$conn = new mysqli('host','user','pword','DB');
$sql = <<<EOT
insert into personalinfo(firstname,lastname) values('$firstname','$lastname');
insert into address(phone,email) values('$phone','$email');
EOT;
$result = $conn->multi_query($sql)
You would be much better off using stored procedures to do this as that is much safer.