I'm new at this so bare with me :-)
Pull the date out as a unix timestamp..
In my SQL statement I have:
SELECT somefield, UNIX_TIMESTAMP(mytable.estate_oh1_date) AS estate_date, someotherfield.......
Is that the proper way to get the date as a unix_timestamp?(estate_oh1_date is the actual date-field in my table that holds a date like yyyy-mm-dd)
And this is what I'm placing in my page...
<?
$current_date = time ();
if ($current_date > $estate_date) {
$diff = $current_date - $estate_date;
}
else {
$diff = $estate_date - $current_date;
}
if ($diff < 2592000) {"Hello World"}
else {"Goodbye World"}
}
?>
Is the Hello World and Goodbye World in the right spot? Hello World being what would show if estate_oh1_date were less than 30 days away from today... and Goodbye World being what would show if estate_oh1_date where more than 30 days away, or is now yesterday.
The above code currently produces a PARSE Error. Should I not be calling for a recordset somewhere in the code near $estate_date?
THANK YOU THANK YOU!!! for your help so far. Sorry if I seem to be clueless.
Peter