<?php $user_info = mysql_query("SELECT * FROM `users` WHERE `id` = $site[id] LIMIT 1"); if (mysql_num_rows($user_info) != 0) { $user_info = mysql_fetch_array($user_info); echo '<div class="menu"> Добавил: <a href="/users/profile.php?act=user&id='.$user_info['id'].'"> '.$user_info['name'].' </a></div>'; } else { echo 'Пользователь не найден!'; }