Basically it is..
I have a Admin page- > In this the admin wil be able to create a user by entering in his particulars:
eg: user name, password for the user, telephone and email address..
The user will able to login using this username and password. Once they log in, they see a form which has to be filled in by them,,..once they submit the form, the form details is passed on to the admin..If the user has sumitted the form, then its completed..

What i need is an Auto reminder for the users to remind them to fill in the report form and send it.. the email address is taken from the user table, that the admin has created...

eg: lets say the user has to submit the report on march
Then an auto reminder has to be sent on Feb 1st. If the user has not yet submitted the form, a 2nd auto reminder must be sent on Feb 7th. if again he hasnt submitted then another auto reminder has to be sent on Feb 21st..
So, total 3 auto reminders upon checking of conditions,....If the user has submitted the report no need to send auto reminders.

The server has to run the php script on its own..
I think this is done using CRONJOB in the cpanel..But i dont have any idea on it,,,I read through many resources, but coudnt get any idea... Can someone help..I need this immediately..Pls help...
I need it to finalize by today...some1 pls help me with this,....

Thanks a LOT..........................................

Recommended Answers

All 7 Replies

You need to maintain a flag in the database,

saying that user has submitted the report or not,

and one more column for last_send_date

To set up a cron just create a new page, in the page, fetch all the users records whose flag is in status of not submitted, and check the details of that user when admin has created it, If the user record is between 0,30 - send him a reminder message and maintain the send date in your users table. For second time check the last sent date with today's date, if that is equals to 7 then resend him again a reminder and mark the date to today in the last_send_date column.

You need to maintain a flag in the database,saying that user has submitted the report or not,

>> How do we maintain a flag in database.. ?

and one more column for last_send_date

last_send_date of the report submitted is it....

To set up a cron just create a new page, in the page,
>> Creating a new page is in php right...

fetch all the users records whose flag is in status of not submitted, and check the details of that user when admin has created it,

If the user record is between 0,30 - send him a reminder message and maintain the send date in your users table.
What is 0,30 - How to write the code for it....
How to check with today's date... ?
For second time check the last sent date with today's date, if that is equals to 7
Why do we check it is equals to 7 >>

then resend him again a reminder and mark the date to today in the last_send_date column

You need to maintain a flag in the database,saying that user has submitted the report or not,

>> How do we maintain a flag in database.. ?

and one more column for last_send_date

last_send_date of the report submitted is it....

To set up a cron just create a new page, in the page,
>> Creating a new page is in php right...

fetch all the users records whose flag is in status of not submitted, and check the details of that user when admin has created it,

If the user record is between 0,30 - send him a reminder message and maintain the send date in your users table.
What is 0,30 - How to write the code for it....
How to check with today's date... ?
For second time check the last sent date with today's date, if that is equals to 7
Why do we check it is equals to 7 >>

then resend him again a reminder and mark the date to today in the last_send_date column

You need to maintain a flag in the database,saying that user has submitted the report or not
1)
Add two columns in database
last_send_date(datetime datatype)
submitted(either you can use boolean datatype or enum datatype)

The default value for submitted column in the table is 0
Once user submitted his report then make submitted field in the table to 1.(This is maintaining a flag, and this is used to check that particular user has submitted report or not, if yes it is not necessary to send him a auto responder message, else we need to send him a message)

To set up a cron just create a new page, in the page
2) Yes you need to create a new page in php, from this page you need to send the autorespons message to user

What is 0,30 - How to write the code for it....
How to check with today's date... ?
3) Immediately after admin is creating the users data, I think you are sending an email message to that user, am I right? If yes, After sending mail to that user, go to his record in database and add sent date to last_send_date column and user_created_date column
and then submitted column to 0.

set you cron to run once in a day

So coming to your cron page, get the users record data as

select usersdata.* , DATEDIFF( CURRENT_DATE, user_created_date) as delta from users usersdata where submitted=0

check delta is in negatives or positives,
If that is nagative leave it , you need not send a reminder to that guy...

If it is positive check the delta is greater than 30, if it is greater than 30 then also leave.. we need not send any autorespond message to him.

else
we need to send autorespond message to him, and update last_send_date to with today's date..., This is actually not necessary nut to check manually whether the message is sent to him or not...we are maintaining this...

In my previous post I wrote check with 7 and all that, it is confusing...Don't use that...follow the above method.

Hope I think it would be clear now

You need to maintain a flag in the database,saying that user has submitted the report or not
1)
Add two columns in database
last_send_date(datetime datatype)
submitted(either you can use boolean datatype or enum datatype)

The default value for submitted column in the table is 0
Once user submitted his report then make submitted field in the table to 1.(This is maintaining a flag, and this is used to check that particular user has submitted report or not, if yes it is not necessary to send him a auto responder message, else we need to send him a message)

To set up a cron just create a new page, in the page
2) Yes you need to create a new page in php, from this page you need to send the autorespons message to user

What is 0,30 - How to write the code for it....
How to check with today's date... ?
3) Immediately after admin is creating the users data, I think you are sending an email message to that user, am I right? If yes, After sending mail to that user, go to his record in database and add sent date to last_send_date column and user_created_date column
and then submitted column to 0.

set you cron to run once in a day

So coming to your cron page, get the users record data as

select usersdata.* , DATEDIFF( CURRENT_DATE, user_created_date) as delta from users usersdata where submitted=0

check delta is in negatives or positives,
If that is nagative leave it , you need not send a reminder to that guy...

If it is positive check the delta is greater than 30, if it is greater than 30 then also leave.. we need not send any autorespond message to him.

else
we need to send autorespond message to him, and update last_send_date to with today's date..., This is actually not necessary nut to check manually whether the message is sent to him or not...we are maintaining this...

In my previous post I wrote check with 7 and all that, it is confusing...Don't use that...follow the above method.

Hope I think it would be clear now

3) Immediately after admin is creating the users data, I think you are sending an email message to that user, am I right? If yes, After sending mail to that user, go to his record in database and add sent date to last_send_date column and user_created_date column
and then submitted column to 0.

Hi saiprem, when the admin is creating the user, we no need to send email to them. The email address is got only to send reminders to them.
Once the admin has created the user, they will inform the user about the login info.. When the user enters in, he has a form to fill in..(something like a survey form). Which they wil be able to submit the report twice a year.. eg: Jan to Jun - 1st report, July to dec 2nd report.. B4 the 1st report submission a email reminder, as like it goes for the 2nd report too..

can u understand it...

Hi saiprem, when the admin is creating the user, we no need to send email to them. The email address is got only to send reminders to them

Still the same trick is valid. After creating user:

add sent date to last_send_date column and user_created_date column
and then submitted column to 0.

Hi saiprem, Could u help me with the code...
Just a simple one... Then i could understand that and carry on...
Pls...
Thanks...

Hi saiprem, Could u help me with the code...
Just a simple one... Then i could understand that and carry on...
Pls...
Thanks...

Please don't mind, I can't sit and write all these now, If you tried the steps which I told you in my previous post,

please post all those pages in the forum, I will see and I will tell you where all the modifications are necessary.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.