I am creating a site which you can post reminders.
I have tried much, but can't seem to be able to send a user an email every day with their reminders in.
I can get the content, through php, but don't know how to automatically send a message every day.
How can I do this through php or any other method?
My database looks like:
Users Table
->User's Row
------->email
------->other fields
Content Table
->User's Post row
------->Content
------->Other
I doubt that the database structure is important, but it is there if you need it.
Just to Clarify: Send each user a seperate email with their content.
Thanks
Update: I have seen a lot of people talking about cron jobs and perl, but I don't have that sort of support for my hosting :(. Are there any other solutions, or a way to find a seperate perl only hosting with just the cron job in?
Something has to tell your PHP script to execute. Look at cron which does just that!
Say your script is called daily-email.php
. A simple crontab setup to run this script daily at 4am would be:
00 04 * * * /path/to/php /path/to/daily-email.php
Read about cron jobs (Linux) or scheduled tasks (Windows).
to do that, you'll need to use cron jobs, see if your webhost supports them. You can use cron jobs to run php scripts on regular intervals.
check here: http://en.wikipedia.org/wiki/Cron write a script(myfile.php) that u want to be executed everyday, thn execute this cron expression 0 0 * * * /myfile.php