| | |
How to compaire Stored Dates with System Date (PHP-MYSQL)
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2007
Posts: 4
Reputation:
Solved Threads: 0
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..
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..
•
•
Join Date: Jul 2005
Posts: 78
Reputation:
Solved Threads: 3
http://www.php.net/date should be of some help especially
•
•
•
•
[coide]M A short textual representation of a month, three letters Jan through Dec [/code]
Chris, Director, Chrisranjana.com
Web developers and software programmers.
Web developers and software programmers.
•
•
Join Date: Jul 2005
Posts: 78
Reputation:
Solved Threads: 3
You can run PHP via command line or via your web browser.
What happens if you type http://localhost/ in your browser ?
What happens if you type http://localhost/ in your browser ?
Chris, Director, Chrisranjana.com
Web developers and software programmers.
Web developers and software programmers.
•
•
Join Date: Jan 2006
Posts: 11
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- [For Hire] Php, Mysql, ASP, AJAX, DHTML programmer (Post your Resume)
- Date Field in MySQL with PHP /add/edit/delete (PHP)
- PHP-MySQL: Registration, Leave Request, Inventory Information, etc... (PHP)
- Hello All: PHP-MySQL Web Designers/Developers. (PHP)
- master database with php mysql (Legacy and Other Languages)
Other Threads in the PHP Forum
- Previous Thread: Guestbook that dont reload
- Next Thread: how to extract data from javascript into php
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date datepart display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack head href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql object oop password paypal pdf php phpincludeissue query radio random recursion recursive remote script search searchbox server sessions shot smarty source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





