Show other BD mysqli data in a new window in PHP

0

Well what I would like to do is to call the database data to display only the main data in a table, and in that same table have the preview button where as long as I press it it opens a window with the rest of the database information. The part of displaying the main information I have already done, but I do not know how to make it open another window and display the rest of the information of that id.

This is the table that shows the DB information already with the button to open another window with the rest of the DB information:

]

Thisisthepartofthecodethatdisplaystheinformation:

    
asked by anonymous 19.06.2018 / 01:42

1 answer

1

You can open a new tab using <a target="_blank" ... by passing the id through the url and retrieving with $_GET :

<a href="detalhes.php?id=<?php echo $f["idEmulador"]; ?>" target="_blank">
    <button class="button">Expandir</button>
</a>

In the details page:

<?php 
$idEmulador = $_GET["id"];

//Realiza a busca pelo id e mostra ...

A design tip, instead of the button you can use an icon like:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">visibility</i>
<i class="material-icons">edit</i>
    
19.06.2018 / 02:11