Honesty Rocks! truth rules.

Sending E-mails After News Update? Coding needed??

HOME      >>       Programming


I need the following code or the idea how to reach this concept. Let's say, I have a database entry which is called "news", where all of the news stories are stored. If this database entry got modified, like the new post was added to the web-site by an administrator, the registered users will get some kind of email notification automatically, I mean the mails are sent automatically without the interaction of someone else.


I don't have the code, but the theory is that in (for example) submit.php (the page that submits the information to the database) calls notify.php which then sends everyone an email telling them about the submission or whatever you want.Simple :D


All right, thanks. Can you write the code over here? Because I am a novice in PHP, and would like to have the correct code with the respect to security.


I'm also somewhat novice and wouldn't have a clue how to do this, let alone the security implications. Someone else will have to.


U can modify the PHP codes which have the adding news function.But if you want to send E-mail, I'd like to say that will definately waste a lot of server resource


So, write over here to help me!



Use the mail() command

mail("user@email","Subject","New blablabla updated!");


Can you write the whole thing, please?