For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2006 > grabbing data and auto email set users









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author grabbing data and auto email set users
JeRRy

2006-04-09, 9:57 pm

Hi,

No code here unless required.

I run this tipping site. All user details are in a table called tipping which stores their id, username, password, email address, score and others.

Than I have tables round 1 through to round 22. (all seperate tables)

This is where users tip to. I have a tipping deadline, however I run this from a javascript countdown code and not connected in any way to the db. (maybe I should for what I need)

in each round i have id, username, game1 through to game 8, score (for that round only) and a column called Misc. Misc is where I know if the user has tipped or not, on default it's NULL, if they tip it's y.

I want to run a PHP script generally 24 hours before the end of the round closing that sends an email ONLY to users that have NOT tipped to date on script running. The email will have details that they have not tipped and a web-url. Now I am not sure
how to do this.

As mentioned below the email address for users are in a different table. Should I put the email value in the rounds table also? How would I go about getting a script to do this?

I know I could send a cronjob to execute it on a set say. And I could change this if the time needs changing in cronjobs. Just need help on the script.

So I need the script to read the desired round and look for the username and misc. If misc y than ignore it and the username. If NULL than grab the username and match it with the email address in the other table. Or I could add the email value in tha
t table if it makes it easier that way.

Preffered email format is Plain-text. But any code that supports HTML is fine too. As long as it recognises what's HTML and what's not. (example if i press the ENTER key it must recognise this as a enter and not a space.)

Could anyone please help me here?

Thanks for your time.

J

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com