I created form which is saving information into my database. I would like to create a page which will go everyday 11pm and pull information regarding to that day and email it to me.
This is my database structure:
1 ID int(11) AUTO_INCREMENT
2 Who text utf8_general_ci
3 Time text utf8_general_ci
4 What text utf8_general_ci
If you’ve got shell access to the web server you can use crontab to set up schedules that will execute the php script at the given time.
This will work in the same way as someone browsing the page. Each time someone browses your page, the script runs. When a schedule starts –> the script runs. The only difference is that it’s run by the local user and not an external user.
You’ll just need to set up your script so that it works the way you want, then set up the crontab for it.
Here’s a link that explains how to use crontab, which will get you started.