pop up with data already in mysql

0

What my page needs is that when modifying a data under an ID, it opens a pop up with data that I have in the db, try to search but I did not find something to help me, the code that I have so far it serves but only to insert

 <script> function abrir() { 
window.open("ingreso.php","recogedor","width=500,height=550, top=50,left=50); 
return false; } 

and doing a href makes another window open

 href="modificar.php?id=<?php echo $row['id'];?>"
    
asked by Felipe Andres 25.06.2018 в 10:26
source

1 answer

1

Pass the id to the function open and from there you pass it as a parameter

<script> 
    function abrirModificar(id) { 
        window.open("modificar.php?id="+id,"recogedor","width=500,height=550, top=50,left=50); 
        return false; 
    } 
</script>

In the element that launches the openModify you just have to pass the id

onclick="abrirModificar("+$row['id']+");"
    
answered by 25.06.2018 в 11:04