This the database im pulling the log in data from
dbo.pwlog
here are the fields:
id: usernameÂ
pw: passwordÂ
name: John DoeÂ
chgdate: 8/28/2009Â
I want to look at the chgdate for the user loging in (the id feild) and compare that with a last changed date (chgdate) with the current date. If its older than 180 days I want to redirect to the change password page.
so what do i replace in the sample code with first?
//** Check if specific record exists ****
global $conn;
$strSQLExists = "select * from AnyTable where AnyColumn='AnyValue'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
// if record exists do something
}
else
{
// if dont exist do something else
}
And what is the php to compare and then redirect to the main page or the change password page?