Php Script To Display Popup Message

I have a cron job running which execute php script after every 1 minute. The php script check particular table and if it finds some value satisfying particular condition a popup window is displayed to user irrespective of what user is doing on website. How can I achieve this of displaying popup?

If I well understand what you want, you should acheive it using notification in your DB. Check this extension :

http://www.yiiframework.com/extension/yii-nfy

Simpler thing should to add a div with a unique id with hidden=true property, then with a bunch of javascript you could open a popup checking if this special div is in page… but it depends of you code structure and where is your script or how it works… we don’t have enough details.