OK, basically I want to check the DB against the elearningid... if the elearningid startdate and enddate are valid, continue, else redirect to expired.php...
EXAMPLE:
<?php
function TimeBomb()
{
rs = sql.Execute(" SELECT * FROM elearning WHERE elearningid=@elearningid AND GetDate() BETWEEN startdate AND enddate ");
if (rs.RowCount > 0)
{
return true;
}
else
{
return false;
}
}
if (! TimeBomb())
{
header("Location: expired.php");
}
}
?>
Anyone have any ideas what I'm missing...
Thanks,
Ted