Re: checking date is not greater than today
| From: | Timothy J. Luoma | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: checking date is not greater than today | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104621@lists.php.net to get a copy of this message | ||
On Sun, 30 Jun 2002, John Holmes wrote:
> $today = date("Ymd");
> if($input_date > $today)
> { echo "Date must be before today!"; }
*thwaps self*
DUH! Thanks... been staring at this for too long.
> It looks like you're dealing with MySQL dates. There are a ton of useful
> functions you can use in your queries that make any time manipulation in
> PHP unnecessary. Chapter 6, Date and Time Functions of the MySQL manual.
I'm not dealing with MySQL dates yet, just simple query strings, but I'll
check that out before I get into MySQL.
Thanks
TjL