PDA

View Full Version : Need Help with Today's Date


Parker Clack
12-16-2001, 04:43 AM
I am wanting to change the welcometext in the index.php file so that if a member signs on and its their birthday I want it to say
Happy Birthday - Membername.

I have the template already changed but I need help with the
if statement

I have:

$user=$DB_site->query_first("SELECT birthday from user WHERE userid=$bbuserinfo['userid']");
$today = vbdate("F jS, Y");
if ($bbuserinfo['userid']!=0 and $today=$user['birthday']) {
$username=$bbuserinfo['username'];
eval("\$welcometext = \"".gettemplate('forumhome_welcomebirthday')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");
} else.................

what I need to know is what do I need to put in the variable for checking today against $user['birthday']

Thanks,
Parker

Gimp
12-16-2001, 06:05 PM
i dont really understand what you want to do
[QUOTE]what I need to know is what do I need to put in the variable for checking today against $user['birthday']

Parker Clack
12-17-2001, 01:54 AM
I am wanting to know what to use in the function for today's date. If I use $today = vbdate("F jS, Y"); that doesn't work. So whatever I need to use for today's date I need to compare that against the birthday of a member. Then instead of saying Welcome, Member Name when they sign on it would say Happy Birthday, Member Name.

That is what I am trying to do.

Parker