I am fairly new to php and mysql but I have created a small site that users log into and create tasks to be sent to specified email on certain days
The days are stored in the database as mon tue wed, etc.
The script is will send the information to all the emails in the database when the script is manually.
Using cron jobs I will schedule the script to run two times a day to send out each users data to their emails.
but I dont know how to tell the script to compare the days the users have specified in the database with the current day to see if it needs to send the email to the users email that day
Any help is appreciated.
Thanks
Map the days your users enter as integers…
Then use a query like this…
select from
mailinglistwheredaytosend= dayofweek(now())FYI.. dayofweek() returns an integer from 1-7