Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
currently I am Working on "Online Discussion Forum With PHP"..
i want help for
when The User is Answering the Question in the Forum
then How do i email that User Directly That Random User Answering This and You have to open This Page....
Basically I am Saying That when Anyone answers the User,
then User Will be Notified that this user Answers you this.

what should i have to use ?? or What Code i have to write.....Help me.

What I have tried:

I don't Tried anything because i don't know how i can solve this
Posted
Updated 27-Aug-17 19:34pm

1 solution

When a user posts a question, you save it to a DB together with the user ID (and probably a timestamp, a subject, a question ID, and related data).
When a user answers a question, you know what question he answered (or you can't "attach" the reply to the question) so you have the DB row for the question, which includes all the info you stored. So access it, retrieve the original user ID, and use that to fetch the user email address. From there it's trivial to send the email in the usual way.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900