Once the book/s is selected from the dropdown listbox the program will automatically set the book’s return date deadline 1 week after the date borrowed. If a book is returned later than that date there will be a penalty of P10 a day. Thanks!
Hi zhelpretty02, This is the code that gives you number of days between two dates $days = (strtotime(date("Y-m-d"))-strtotime("2009-1-20") ) / (60 * 60 * 24); echo $days; Now utilize this code according to your program logic.
If you store a GMT UNIX timestamp keeping track of then the book was checked out. if(time() - $checkout_timestamp > 604800) { //book is late } Code (markup):
Timestamps are in seconds. That's where you gonna start. The two codes above should gives you the idea.