Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to compare Stored Dates with System Date (PHP-MYSQL)

    Hi,
    I have a table named 'team' which has fields such as name,contactno and dob.

    My entries are:

    For eg:
    name : Arun Kumar K
    contactno : 9445123880
    dob : 27 Mar

    I want to display the name of corresponding members(here Arun Kumar K) on the previous day of his dob(here 26 Mar) as

    For eg:

    Tomorrow is Arun Kumar k's Bday

    and on 27 Mar as

    today is Arun Kumar K's bday.

    This should be displayed on the first page(index.php) of my website automatically
    (like www.orkut.com's home page)

    That mean dob should get compaired with System date on each day and the correspondin name(s) should get displayed on the particular days automatically

    I used echo date('d-m-y'); for getting system date,but it is not giving as what i expected,ie 27 mar,it is giving 27 03.For the rest(the compairing work) i worked for two days(i am a newbie) but no result.

    Please help.
    Its very much needed for the completion of my web project.
    If u can plz provide me with full script.

    plzz help..

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe
    PHP Code:
    date('d M'); 
    your current
    used echo date('d-m-y'); for getting system date,but it is not giving as what i expected,ie 27 mar,it is giving 27 03
    should give you 27-03-07 btw...
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •