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

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down me

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Extending Exception to contain method name
I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a

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