the-botman Posted May 22, 2010 Share Posted May 22, 2010 hi guys... ok i need some help but then again whats new lol, ok what i need this part of the code to do is calc the day the user was born, the day the next birthday falls on and the age of the user, Note: it gives me the next birthday day. this is the code i have now but its not working if (Get_QString('Post') == "True") { $Date_Day = GetPost('Day'); $Date_Month = GetPost('Month'); $Date_Year = GetPost('Year'); $h = mktime(0, 0, 0, $Date_Month, $Date_Day, $Date_Year); $d = date("F dS, Y", $h) ; $w= date("l", $h) ; $Birthday= date("-l", $h) ; echo '<div class="hd2"><center><font color=#666666><strong>Day you were Born</strong></font></center></div><br>'."\n"; echo '<font face="Verdana" size="2">You were born on a: <b>'.$Birthday.'</b></font><br>'."\n"; echo '<font face="Verdana" size="2">You Your Next Birthday falls on a: <b>'.$w.'</b></font><br>'."\n"; echo '<font face="Verdana" size="2">You Are now: <b>'.$Age.'</b></font><br>'."\n"; Quote Link to comment Share on other sites More sharing options...
the-botman Posted May 22, 2010 Author Share Posted May 22, 2010 this is were i am now $Date_Day = GetPost('Day'); $Date_Month = GetPost('Month'); $Date_Year = GetPost('Year'); $Year=" $hour = "23"; $h = mktime(0, 0, 0, $Date_Month, $Date_Day, $Date_Year); $d = date("F dS, Y", $h) ; $w= date("l", $h) ; $Birthday= date("-l", $h) ; $hour="00"; $minute="00"; $second="00"; $Year= date("Y"); $time=mktime($hour, $minute, $second, $Date_Month, $Date_Day, $Year, -1); $today = time(); $difference = $time - $today; if ($difference < 0) $difference = 0; $days_left = floor($difference/60/60/24); echo '<div class="hd2"><center><font color=#666666><strong>Day you were Born</strong></font></center></div><br>'."\n"; echo '<font face="Verdana" size="2">You were born on a: <b>'.$Birthday.'</b></font><br>'."\n"; echo '<font face="Verdana" size="2">You Your Next Birthday falls on a: <b>'.$w.'</b></font><br>'."\n"; echo '<font face="Verdana" size="2">You Are now: <b>'.$Age.'</b></font><br>'."\n"; echo '<font face="Verdana" size="2">There are: <b>'.$days_left.'</b> left Untill your birthday</font><br>'."\n"; Quote Link to comment Share on other sites More sharing options...
the-botman Posted May 22, 2010 Author Share Posted May 22, 2010 can someone just show me how to get the day the user was born based on their date of birth Quote Link to comment Share on other sites More sharing options...
ignace Posted May 22, 2010 Share Posted May 22, 2010 if (Get_QString('Post') == "True") { $Date_Day = GetPost('Day'); $Date_Month = GetPost('Month'); $Date_Year = GetPost('Year'); echo date('l', mktime(0, 0, 0, $Date_Month, $Date_Day, $Date_Year)); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.