{% else-1 %}
(7 сен 2015, 06:17) (0/0) [0]
[code]<?php
$present=mysql_fetch_array(mysql_query("SELECT * FROM `presents` WHERE `id_user` = '".$user['id']."' "*);

$count=mysql_result(mysql_query("SELECT COUNT(*) FROM `presents` WHERE `id_user` = '".$user['id']."' AND `read` = '0'"*,0);

if($presents){echo'<a href='new_podarki.php'>new подарки +'.$count.' </a>;}else{ echo "<a href='podarki.php'>Все подарки ('.$count.') ';
</a>}?>
[/code]
  • 1 из 1