I am designing an intranet based website. I need a mechanism where when a new sales order is recorded in the sales department, the stores department automatically receives an alert (a pop-up, or a sound/beep of some sort). I am using PHP, and MySQL. The webserver is Apache. What I need is some sort of instant messaging service based on these tools. Any suggestions?
My research on the web has not yielded satisfactory results.
Instant alert or popup based on PHP and MySQL?
Hmm, in PHP/MySQL not that easy
I'd make a little popup, that is open on the stores department computer such as monitor.php
That PHP file checks for a new sale, if there is it echos/prints 'New sale' or whatever
This page also has a line of Javascript code to reload it every 10 seconds or whatever (plently of snippets around on net)
Reply:this is a good question,,
what i would do is build a page and using javascript get it to refresh at a set interval, then as the page reloads using php query the mysql database to see if a new record has been inserted if it has, you can then output a javascript alert to the loading page alerting the sales dept of a new sale.
but an easier way would be if they have mail software like outlook running, just set up a script / storred procedure to send an email for each new order, as with ouotlook it pops up a little box to let you know you have mail thus providing a visual alert.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment