PHP Code:
$currD=date("d", time());
$currm=date("m", time());
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm'",$db), 0);
$k_bday=mysql_result(mysql_query("SELECT `nick` FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT 1 "),0);
$bday=mysql_result(mysql_query("SELECT `id` FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT 1 "),0);
$sisa=$k_post-1;
echo '<div class="p_t2">';
if($k_post==0){
echo "";
}
if($k_post==1){
echo "<table class='notif' width='100%'><tr><td width='2%'><img src='/style/icons/ultah.png'> <a href='/info.php?id=$bday'>$k_bday</a> sarbatoreste azi ziua de nastere</td></tr></table>";
}
if($k_post>=2){
echo "<table class='notif' width='100%'><tr><td width='2%'><img src='/style/icons/ultah.png'> <a href='/info.php?id=$bday'>$k_bday</a> si <a href='/list_bday.php?SESS=$sess'> inca $sisa </a> sarbatoresc azi data nasterii </td></tr></table>";
}
PHP Code:
$k_bday=mysql_result(mysql_query("SELECT `nick` FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT 1 "),0);
$bday=mysql_result(mysql_query("SELECT `id` FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT 1 "),0);
Comment