Good question :) Well, first you need to learn JavaScript . Well, then if there is a desire for jQuery . To solve this problem, I will give you an example on jQuery .
Create CSS style:
#set{ opacity: 0.9; filter: alpha(opacity=100); background-color: #000; display: block; position: fixed; left: 0; top:0; width: 100%; height: 100%; z-index: 9; } #mess{ background: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dddddd)); background: -o-linear-gradient(top, #fefefe, #dddddd); background: -moz-linear-gradient(top, #fefefe, #dddddd); position: absolute; top: 30%; right: 35%; width: 30%; height: 22%; border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; -webkit-box-shadow:0px 0px 15px white; -moz-box-shadow: 0 0 15px rgb(255, 255, 255); box-shadow: 0 0 15px rgb(255, 255, 255); z-index: 10; position: fixed; font-size: 18px; border: 1px solid grey; color: #616161; }
Next, create a script on jQuery :
$(document).ready(function(){ $('#set').hide(); $('#mess').hide(); $('#info').click(function(){ $('#set').show(1000); $('#mess').fadeIn(1000); return false; }); $('#close').click(function(){ $('#set').hide(1000); $('#mess').fadeOut(1000); }); });
And at the end we create a script in php & html :
<!DOCTYPE html> <html> <head> <!-- Сюда засовываем код jQuery и CSS --> </head> <body> <div id='set'></div> <div id='mess'> <?php $sql = mysql_query("SELECT * FROM klienti"); while($row = mysql_fetch_array($sql)){ echo "Логин: ".$row['login']."<br>"; } ?> <center><a href='#' id='close'>Закрыть</a></center> </div> <br /> <a href='#' id='info'>Показать клиентов</a> </body> </html>
This code is, of course, visual, but still, maybe you will understand something.