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
-
If you add automatically do that, You can see every day got some ones birthday.....Coz So many fake members on a site that are only regd for a day or flood reason, giving the birthday fake. I recommend to use A panel on Owner Cp that pm you automatically that a users birthday on tommorrow and you can easily update your page regarding that pm.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
-
if your using wapdesire v2 then you will have to change the sql i cant remember wapdesire v2 sqlOriginally 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