Problem in Php --Parse error: syntax error, unexpected '='

0

I am trying to make a form that takes the data from a table in phpmyadmin. It gives me error in the following code. Does anyone know the error?

<?php
    if(isset($_GET["libro"])){
        $resultado = mysqli_query($enlaceBD, "SELECT * FROM libros where id= row[$id]");  
    } else {
        resultado = mysqli_query ($enlaceBD, "SELECT * FROM libros where id = '1'"];
    }
    $row = $resultado ->fetch_assoc();
{
    
asked by Juan 20.11.2018 в 13:25
source

1 answer

0

Replace this

$resultado = mysqli_query($enlaceBD, "SELECT * FROM libros where id= row[$id]");

Because of this

$resultado = mysqli_query($enlaceBD, "SELECT * FROM libros where id= ".row[$id].")";
    
answered by 20.11.2018 в 13:36