How to open a new window to view data from a mysql table via php?

1

Well what I would like to do is the following, where I'm learning php, I made the page to view the registered users as name and email fields, and I made a preview button that will call a new window with all user data, the mode I learned is all dynamically in a single page, but I want that clicking on preview opens a new window as if it were pop-up with all user information.

What I learned was, put the button in the view the following code:

<a href='administrativo.php&id=<?php echo $dado['op_id']; ?>'<button type="button" class="btn btn-xs btn-primary"><i class="fa fa-fw fa-eye"></i></button></a>

On the administrative page is:

<?php
$link = $_GET["link"];
$pag[1] = "visualizar.php";   
if(!empty($link)){
        if(file_exists($pag[$link])){
            include $pag[$link];
        }else{
            include "dashboard.php";
        }
    }else{
        include "dashboard.php";}?>

Then inside the administrative page it shows me the user information.

What I need is that clicking on preview opens a new window with all the information.

I tried to change the code to:

 <a href='visualizar.php&id=<?php echo $dado['op_id']; ?>'<button type="button" class="btn btn-xs btn-primary"><i class="fa fa-fw fa-eye"></i></button></a>

but returns me page not found.

Can anyone help me?

    
asked by anonymous 07.07.2016 / 04:39

1 answer

1

Next: Missed the "?".

view.php? id = Following:

 <a href='visualizar.php?id=<?php echo $dado['op_id']; ?>'<button type="button" class="btn btn-xs btn-primary"><i class="fa fa-fw fa-eye"></i></button></a>
    
07.07.2016 / 22:29