Hi, has anyone got the coding for the "happy birthday .member." on the main page, where it automatically puts a message up on main page saying who's birthday it is. please post it here. thnx.
birthday on main oage coding plz
Collapse
X
-
Originally posted by justme101 View PostHi, has anyone got the coding for the "happy birthday .member." on the main page, where it automatically puts a message up on main page saying who's birthday it is. please post it here. thnx.
-
this is from lava with slight modification to select 1 order by rand
PHP Code:$sql = "SELECT id, name, birthday FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate()) ORDER BY RAND LIMIT 1";
$items = mysql_query($sql);
while ($item = mysql_fetch_array($items))
{
$uage = getage($item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a> Age: $uage";
echo "$lnk<br/>";
}
Last edited by something else; 16.08.10, 19:26.
Comment
-
try this code
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate());"));
if($noi[0]!=0){
$sql = mysql_fetch_array(mysql_query("SELECT id, name, birthday FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate()) ORDER BY RAND() LIMIT 1"));
$uage = getage($sql[2]);
$lnk = "<small><b>Happy $uage birthday</b></small><br/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$sql[1]</a>";
echo "$lnk<br/>";
Comment
-
Originally posted by justme101 View PostI added it, but it doesnt show on main page who's bday it is, i created a test account and it didnt show up. I'm using a wapdesire V2 script. Does that code work on wapdesire V2? Where do I put the code?
Comment
Comment