I am having a problem with loading image from a link where one of the folder name i getting from user input.

PHP Code:
include "dbconnect.php"

a href= <?php echo $link1 ?> class = 'cloud-zoom' id='zoom1' 
            rel="adjustX: 20, adjustY:-5, tint:'#FFFFFF', tintOpacity: 0.4"> 
            <img src=<?php echo $link2 ?> alt='' title="Optional title display" /> 
with this code image doesn't load. if I put your mouse on the broken link i see admin/images/1861 but dont see the image name. here 1861 is the $pid im getting from user. any one can tell me where is the problem please.