0

hai all, i am working on a project, my project have 3(bronze, silver, gold) types of payments, payments are done through the paypal the expiry date is one month. if user reach the expirydate we must send email to him, after expirydate is passed his payment type change to bronze(it is free, no price to register), is it possible? if anybody having idea. please guide me.

Edited by raju_boini525: n/a

6
Contributors
11
Replies
12
Views
7 Years
Discussion Span
Last Post by SKANK!!!!!
0

ofc it is possible. What have you done so far?

post code. Ask a specific question. and Read the rules.

0

Run a cron job every day/night. Check if the date saved in the table has passed expiry date.
If yes,
send mail,
update the table with relevant changes.
If no,
do nothing.

0

thanks for rply, i dont know about cron job, do you have any idea or example code or any material, plz help me

Edited by raju_boini525: n/a

0

Sorry, I don't have any example/material to explain. Please ask your system admin or do a search in google. That will probably show you the right direction.

0

save the date in a timestamp, not some human-centric text date format,
php date(); mysql now(); work

on query if($date+(30*24*60*60) < date()) { /* kill the upgrade level */} thought process only very obviously not valid code

cron:noun; approximately the server equivalent of windows task scheduler

Edited by almostbob: n/a

0

this upgrade proces done by automatically. if user expiry his one year automatically paymenttype change to "bronse", is it possible without using cron.

0

comon on man for real. this is so easy. you save the day he/she purchased your service, then everyday you check if any of the users are expired, (simple SQL) and then do code.

if you show me what you have done so far I will help you more.

Edited by finito: n/a

0

save the date in a timestamp, not some human-centric text date format,
php date(); mysql now(); work

on query if($date+(30*24*60*60) < date()) { /* kill the upgrade level */} thought process only very obviously not valid code

cron:noun; approximately the server equivalent of windows task scheduler

u should do this: and use time(); to put the timestamp in the databse:
now this is how i do it for my website:
u have to set the timestamp for the date it expires, not the date that it starts.(mine is twodays so i would set the time in the database to two days past the current time right when it starts:

$twodays = time() + (2 * 24 * 60 * 60);

.. its the 2 that u would have to change to a 3 or 5 f u wanted 3 or 5 days)
and then u check:

$twodays = time();
$twodaything = "activated";
$noapp = "expired";
$checkmanapp = mysql_query("UPDATE table SET status = '$noapp' WHERE status = '$twodaything' AND twodays < '$twodays'");
0

thanks for reply,

how it is work automatically, where do i put your code please help me.

0

you forget about the automatic things.
YOu simply write script to check records where current date is greater than expiry date in user table.
then for those records send mail to user and update their status from gold to bronze.

AFter you complete this script tell your administrator or webmaster to run this script every day. he/she will schedule your script to run daily.

0

it wont do it automatically unless u use a cron job wheich i have no idea what that is.
the only way it will work (the code i submited) is if u actually have it run on a page.
i use that code on a page that is ran when the user logs in. that way whenever someone is logged in, all the people with therestatus expired, gets there status changed to expired.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.