now its whorking tanks
echo'<div class="footer"><b>Random Photo</b></div>';
$hammad4=mysql_query("SELECT `id`, `user_id`, `tmb_name`, `time` FROM `cms_album_files` order by rand() limit 1 ") ;
$ar34=mysql_fetch_array($hammad4);
echo'<div class="list2"><img src="../files/users/album/'.$ar34['user_id'] .'/'.$ar34['tmb_name'] .'" alt="'.$ar34['id'] .'"/> ';
print'<a href="../users/profile.php?user='.$ar34['user_id'] .'">Visit Profile</a><br/>';