How to open a popup page with in a condition statment?

How to open a popup page with in a condition statment?

Hi
I want to create a popup page with 800px width and no toolbar or status bar but I want the right scrolbar to be automatic.

So I have a php code like do

<?php 

If($sql){

echo 'bingo';
// popup page
}
?>
How can I do that with jquery?