How to create a window that pops up on a link that is displayed in a loop from the database?

There is a task: to display links to clients when they click on a window pops up with info from the database. There are pop-up windows, but I don’t know how to tie them to PHP. Tell me some solution. jQuery window in the form for some reason is not displayed. Thank.

Closed due to the fact that the question is not clear to the participants of Athari , fori1ton , VenZell , andreycha , andrybak on Apr 7 '15 at 10:16 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 13
    Cheres CTML and javascrypt. - SilverIce
  • @michael ____ 1, rephrase, please, your question: correct grammatical errors, place commas correctly. If you add more clarifying information, you will speed up the receipt of the answer. - Sofver
  • 2
    fuuuu, illiterate shkolota - DreamChild

1 answer 1

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.

  • 2
    so it was not too lazy ... - istem
  • one
    @istem, it happens)) - k0mar