I am working on a calendar that displays dates for training classes my department offers.
The staffperson who enters new classes puts in a date she wants registration to open.
I want the page to display all the classes and then, depending on this registration date, either display a link to the registration form, or display "registration begins on X date"
My problem is that I cannot construct the IF statement correctly. Here is the code:
if ($row2->RegDate > NOW()) {
echo "<a href=\"http://www.mysite.com/register.php?selected=$SessionID\">Register Online</a>";
} else {
echo "Registration begins 1/1/07";
}
and it displays this error in the browser:
Fatal error: Call to undefined function: now() in /home/htdocs/oor/gcm/calendar/betacalindex.php on line 422
I am at a loss, because NOW() seems to work in queries when I want to pull only classes with an event date later than today.