Im trying to make a page on my site to show all users birthdays everyday so I have this to get todays date

$today = date("Y-m-d");
//shows 2008-02-19

Birth dates are stored in my DB in this format

1983-04-21

so I don't know how to get the results for today

Like how do I lookup in my mysql table for just the day and month and not worry about the year value?

    select auto_id,dob from friend_reg_user where status='Active' and DAYOFYEAR(dob) between DAYOFYEAR(now()) and (DAYOFYEAR(now())+1)

    seems to work

      I need a little help still I want to take this variable

      $line['dob']

      which returns this format

      1991-02-19

      and make it show

      Feb 19th and no year

      , any help appreciated

        ok here what I came up withso far...it has a weird result that im not looking for though, if you look at the first 2 line you see I have it show the output of that = Sunday the 19th and Wednsday 19th, both of these should say Tuesday the 19th since that would be today

        <?php
        
        $line['dob'] = '1990-02-19'; //shows Sunday 19th
        //$line['dob'] = '1989-02-20'; //shows Wednesday 19th
        
        $cur_date = date($line['dob']);
        $cur_date_day = substr($cur_date, 8, 2);
        $start_date = date("l jS", mktime(0, 0, $cur_date_day, $cur_date_day));
        echo '<div align="center">' .$start_date. '</div>';
        ?>

          hmm I tried getting month it it shows different month values as well, very strange

            Write a Reply...