Currently, as the sending of the email was giving a lag in the application, because it has to connect with Gmail etc, I transferred to the server the mission to send these messages, as follows: / p>
- User writes the% s message to the recipient and the% s.
- On the server I have an open page that gets reloaded every 10 seconds.
- This page searches the database in
tbl_msg
, when it finds, it executes a PHP code that sends the email.
This way the application for the user does not suffer lag some.
What I want
Is it possible for the database itself to do something that if any data is written to tbl_msg
automatically MySQL execute the PHP statement, without having to have an open page?