rmelino Posted September 10, 2009 Share Posted September 10, 2009 Hello, I have a unique problem that I can't seem to figure out... I have a directory of members on my site. A user that comes to the site can contact a member by sending a form message through that member's profile page. When a user contacts a member, that user's message is sent directly to that member but is also sent to other members within close geographic proximity. The problem I am having is that if the same user chooses to contact say 5 different members through the contact form on each of the 5 member profile pages, the members within close proximity get a copy of all 5 of those form submissions. I'd like to instead have it only send the members within close proximity 1 copy of the message from that same user. I'm having trouble coming up with an if statement that essentially says 'if user has submitted a message previously, only send his message to other members one time' I hope this makes sense and that perhaps someone has run into the same problem previously... Quote Link to comment https://forums.phpfreaks.com/topic/173824-avoid-sending-duplicate-emails/ Share on other sites More sharing options...
mikesta707 Posted September 10, 2009 Share Posted September 10, 2009 im assuming that the messages get stored in some sort of table. Before you add the messages to the table, just check to see if the message is there already. if not add it, if so don't. Quote Link to comment https://forums.phpfreaks.com/topic/173824-avoid-sending-duplicate-emails/#findComment-916251 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.