943,791 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4113
  • PHP RSS
Feb 5th, 2007
0

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

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jeffry is offline Offline
4 posts
since Jan 2007
Feb 6th, 2007
1

Re: How to compaire Stored Dates with System Date (PHP-MYSQL)

http://www.php.net/date should be of some help especially

Quote ...

[coide]M A short textual representation of a month, three letters Jan through Dec [/code]
Reputation Points: 11
Solved Threads: 3
Junior Poster in Training
chrisranjana is offline Offline
82 posts
since Jul 2005
Feb 7th, 2007
0

Re: How to compaire Stored Dates with System Date (PHP-MYSQL)

i) what is the method of run php. i have installed php and apachce server in my pc.
ii) is php run in iis server? is it possible?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nidhya is offline Offline
2 posts
since Feb 2007
Feb 7th, 2007
0

how to run php

Click to Expand / Collapse  Quote originally posted by nidhya ...
i) what is the method of run php. i have installed php and apachce server in my pc.
ii) is php run in iis server? is it possible?
iii) any other supporting software need in php?
iv) give me a procedure to run php
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nidhya is offline Offline
2 posts
since Feb 2007
Feb 7th, 2007
0

Re: How to compaire Stored Dates with System Date (PHP-MYSQL)

You can run PHP via command line or via your web browser.

What happens if you type http://localhost/ in your browser ?
Reputation Points: 11
Solved Threads: 3
Junior Poster in Training
chrisranjana is offline Offline
82 posts
since Jul 2005
Feb 7th, 2007
0

Re: How to compaire Stored Dates with System Date (PHP-MYSQL)

Hi,

Calculate the time stamp for one day(strtotime), now get the timestamp for the birthday and the timestamp for the currect server time.. when the timestamp of B'day is equal to (timestamp of current date - timestamp of one day) Display .. tommorow is B'day.. when the timestamp of b'day equal to timestamp of current day .. dispplay today is b'day....

i am not sure mine is the efficient logic... but you can try if you want..

~J
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jaikar is offline Offline
11 posts
since Jan 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Guestbook that dont reload
Next Thread in PHP Forum Timeline: how to extract data from javascript into php





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC