PHP notification based on user defined conditions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
inovak
Forum Newbie
Posts: 1
Joined: Mon Jul 20, 2009 12:08 pm

PHP notification based on user defined conditions

Post by inovak »

Hello all,

I've been working on a site and the client wants a type of functionality that, based on customer preferences, will notify customers automatically when a preferred product goes on sale.

Since sale information is uploaded on a weekly basis, this means that all notifications will be sent out on the same day.

Sale information is uploaded into a MySQL database. I'm trying to come up with a way to notify everyone of their preferred sale information.

My preliminary thoughts are
when an admin clicks "notify" the code checks all users for !empty(preferredSales) && preferred sale matches an actual sale. Then for the left over results create a foreach loop sending email to each user who is left including their preferred sale and the matching actual sale

Does anyone see any problems with this logic?

-Ivan
Post Reply