$conie= new mysqli("localhost","utasokostores_us","kensta879097","utasokostores_da"); $resulty = mysqli_query($conie,"SELECT * FROM `products` WHERE location = '$location' "); while($rowie = mysqli_fetch_assoc($resulty)){ $location = $rowie['location']; } ?> $conu= new mysqli("localhost","utasokostores_us","kensta879097","utasokostores_da"); $resultu = mysqli_query($conu,"SELECT * FROM `merchants` WHERE location = '$location' "); while($rowu = mysqli_fetch_assoc($resultu)){ $pic = $rowu['photo']; $id= $rowu['id']; $phone = $rowu['phone']; } ?>