thank you - I have amended this and it gets rid of the error message.
However the code isn't performing as I would expect,
$today = 2005-11-15
$open = 2005-12-13
$end = 2005-12-19
today is clearly outside of the period between $open and $end, but the code only executes whatever I put in the IF clause.
For example if I put
$today = date('Y-m-d');
IF ($today >= '$OpenEarly' OR $today <= '$EndDate')
// if today is within the period
{
// code goes here to run a series of queries to create a user entry form
}
ELSE
{
echo ' error message'
}
the page will run the code no problem
But it ran the code even though todays date is not within the period - which is a problem !
So I tried turning it around
$today = date('Y-m-d');
IF ($today < '$OpenEarly' OR $today > '$EndDate')
// if today is outside of the period
{
echo ' error message'
}
ELSE
{
// code goes here to run a series of queries to create a user entry form
}
when this code is run I get the error message which is what I would expect, but to test it all I changed the dates in the database so that todays date fell inside the period and I still got the error message.
So whichever statement I put in the IF clause seems to run regardles of whether the date is inside or outside of the period.......
This is driving me nuts !
I am not very familiar with using dates in queries so I cannot see where I am going wrong.
Can anyone help - thanks