Dear All,
i want to make a program through which, our chairman gets a prompt message one day before a deadline of a specific event comes.
In database, il make a database fields like,
serialno, file, intial date, deadline date, status

how a user to get a deadline prompt message continues blinking when a deadline of a file comes?
Help Please !

4 Years
Discussion Span
Last Post by diafol

Actually i want to alert the user the number of timeout events with a alert message with an option for VIEW those timeout events OR CLOSE.


If you want js alert:

var diff = new Date(new Date("2012-01-03") - new Date("2012-01-02"));
alert(days = diff/86400000);

You can insert dates from php:

var diff = new Date(new Date("<?php echo $date1;?>") - new Date("<?php echo $date2;?>"));
alert(days = diff/86400000);

No, Diafol;
your not getting the point !
I dont want user to input into prompt message.
i want to show an alert message on the basis of the recordset showing records of pending events which have crossed the deadline dates.

1) alert box showing options

what i need is a alert box ! havivng option VIEW and CLOSE, If user clicks VIEW it redirects to the page showing the timeout/pending records else on the same page..


OK, use the datediff function in mysql.

SELECT * FROM table WHERE DATEDIFF(`deadline_date`,CURDATE()) <= 1

You can then get the actual items and the total number of them.
Or if you just need the total number for showing in the alert box:

SELECT COUNT(*) AS cnt FROM table WHERE DATEDIFF(`deadline_date`,CURDATE()) <= 1

Warning: Not Tested

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.