I think you can simply all that code if you do a JOIN
query -
SELECT i.*
FROM user_access a
LEFT JOIN item_info i
ON i.item_id = a.access
WHERE a.user_id = '$user_id'
This joins together your user_access table with your item_info table on access = item_id, and where user_id is the logged in user.
then your code can be reduced to -
if (isset($_SESSION['user_login'])) {
$info_query = mysqli_query($connection, "SELECT i.* FROM user_access a LEFT JOIN item_info i ON i.item_id = a.access WHERE a.user_id = '$user_id'");
while ($row = mysqli_fetch_assoc($info_query)) { ?>
<div style="background-color: #F2F2F2; border: 1px #E3E3E3 solid; padding: 20px; margin: 5px; width: 150px; float: left;"><?php echo $row['vid_id']; ?></div>
<?php }
}