I have two tables in database of my users.
First table contains user unique ID, Name, Contact No and other personal information.
Second table contains unique id of user from first table and device information like his first machine number, second machine number and many others also.
My table no 2 structure is..
On the reports page, I am showing all the information in a table form using this
$sql = "SELECT e.* ,d.* FROM emitra_basic As e INNER JOIN emitra_device as d ON d.uid=e.uid";
$result = $conn->query($sql);
if ($result->num_rows>0) {?>
<table ><tr><td> Uid</td><td> Name</td>
<td> Micro Atm</td>.......and all column of both tables </tr>
<?php while($row = $result->fetch_array()) {
echo "<td>". $row['uid']. "</td>";
echo "<td>". wordwrap($row['name'],15,"\n",1). "</td>"; ....and all
} echo "</table>";
It works fine. But I want to show a customised report. It means I want to give check box/radio button for user of tables field. If he select field uses check box then its show only those value which check box/radio button are selected. It likes if user select three check box/radio button like Uid, name, m_atm. It shows only details of three columns from both tables and display table view accordingly these columns.