PHP-Mysql Routine Required
I require a PHP-Mysql routine written, this will be a standalone script that does the following Logs into mysql database, accesses the “users” table, Creates an array of all users with added date over three days old
all users with the “ustatus” field containing a “0” change to “1”
(this activates non activated users)
all users with the “rank” field containing “no” change to “2”
(this creates the users rank)
all users with the “survey” field with a “0” will be sent an email with a link to a survey page
“survey” field will then be changed to 1 for these users
(showing they have been sent the survey email)
The email content will be drawn from a text file eg: $message = "/[url removed, login to view]";
The email will also contain a login link,
the users username and password and an explanation about
the survey and bonus for filling in the survey,
The script wont output to browser as I intend to have the script activated by a crontab once per day
or maybe by the scripts own routine based on server time activating once per day?
However an email to admin address advising each time the script has activated
containing how many user accounts have been activated and how many survey emails have been sent out would be handy.
Send a message and I will provide url and user details so you can see the how the front end works.