PHP time (deadline within one week)


Posted on 16th Feb 2014 07:03 pm by admin

I have a column ['projdue'], which stores the deadline for a project.
I have PHP code and <span class>'s to show projects that are within timescale, due today and overdue:
Code: <?php
// get the date parts from the MySQL date
Did you know?Explore Trending and Topic pages for more stories like this.
$dateparts = preg_split('/[-s]/', $row_rsProjects['projdue']);
// get the Unix timestamp for midnight at the beginning of the due date
$projdue = mktime(0,0,0, $dateparts[1], $dateparts[2], $dateparts[0]);
// get the Unix timestamp for midnight at the beginning of today
$today = mktime(0,0,0, date('n'), date('j'), date('Y'));
if ($today == $projdue) { ?>
<tr class="duetoday">
<?php } else if ($today > $projdue) { ?>
<tr class="within">
<?php } else if ($today < $projdue) { ?>
<tr class="overdue">
<?php }?>What I'm after is a bit of code to flag-up any projects that are due in 7 days
No comments posted yet

Your Answer:

Login to answer
137 Like 19 Dislike
Previous forums Next forums
Other forums

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

passing data from one page to another
hey guys
i have the follwoing code to get information from one page and place on another:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash