V
V
Vyacheslav Mulyukin2015-10-21 01:14:01
PHP
Vyacheslav Mulyukin, 2015-10-21 01:14:01

How to read text from a table?

I derive a table from the database
It is necessary that by clicking on a certain line all the information in it is stored in variables and displayed on the next table.
How can this be implemented?

<?php 
while ($user = $stmt->fetch( PDO::FETCH_ASSOC ))
echo '
<div class="stroka_klient">
<div class="id_klient">'.$user['K_id'].'</div>
<div class="name_klient">'.$user['K_name'].'</div>
<div class="telephone_klient">'.$user['K_phone'].'</div>
<div class="email_klient">'.$user['K_mail'].'</div>
</div>';
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Startsev, 2015-10-21
@esvlad

c jquery

$('div.stroka_klient > div').click(function(){
  var savetext = $(this).text();
});

and then process the savetext variable as you want

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question