0

My friend is writing a simple forum,
In this forum there is 1 MySQL database with 4 tables(forumsections, members, posts, replies)
The question:
He wants to notify by mail those members who have posted new posts, when anybody replies to their post. (like in this forum). Now he has a checkbox in the post form(when posting a new post member has choice to have notifications by mail, if he checks the checkbox notifications will be sent him by mail otherwise not(by default checkbox is checked)). How to code this idea in PHP.
Thanks in advance

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by network18
0

My friend is writing a simple forum,
In this forum there is 1 MySQL database with 4 tables(forumsections, members, posts, replies)
The question:
He wants to notify by mail those members who have posted new posts, when anybody replies to their post. (like in this forum). Now he has a checkbox in the post form(when posting a new post member has choice to have notifications by mail, if he checks the checkbox notifications will be sent him by mail otherwise not(by default checkbox is checked)). How to code this idea in PHP.
Thanks in advance

Whenver some post get the reply execute this code.This will give you all the members who have chosen to get informed by email when some post gets the reply
new_post_mail is the column field in the members table , set to 1 if the member checks the checkbox, else 0

$query = "select member_id,member_email_id from members where new_post_mail = '1'";

and mail using to this member_email_id. Put the link of that post in the mail

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.