Hi there.
I have set up my database to log timestamps Signup dates and end subscribers date with a last login update to date timestamp.
The code in my subscriber signup page looks as follow:
// first we check wat the date and time is for the signupdate field
$datetime = date("Y-m-d H:i:s");
// # Timestamp ends for beginning subscription //
// # Timestamp starts for end subscriptions //
$n_start_date = "".time();;
$squery = "SELECT DATE_ADD(FROM_UNIXTIME($n_start_date), INTERVAL 182 DAY)";
$nresult = mysql_query($squery);
$s_new_date = mysql_result($nresult, 0, 0);
// Free the result
mysql_free_result($nresult);
// Disconnected
$expire = "$s_new_date";
// # Timestamp ends for end subscription //
And I have the following code in my login page:
// we determin the date for the lastlogin - field:
$datetime = date("d-m-Y G:i ");
// and we update that field
$query = "UPDATE ".$DBprefix."signup Set lastlogin = '$datetime' where username='$username1'";
$result = mysql_query($query);
// now that the correct password is used to log-in, reset the numloginfail-field to 0
$query = "UPDATE ".$DBprefix."signup Set numloginfail = '0' where username='$username1'";
$result = mysql_query($query);[/COLOR]
I have trouble to have the database send out a notification to the member about 2 weeks before his subscription ends and to have the database updated when he does resubscribe, or if he doesn't, to have his name removed from the DB.
Can anyone help me please?
Thanking you in regards