Problem when ordering the database

0

I have the following doubt and error:

Sorry to come here to ask for help but I have no other choice. I'm not even allowed a new topic. I have the following doubt and error:

  

On the processing page I have:

    <?php
           $conexion = mysqli_connect("localhost","root","","pruebadatos");
           mysqli_set_charset($conexion,"utf8");
           $peticion="SELECT * FROM productos WHERE enlace=".$_GET['id'];
           $resultado=mysqli_query($conexion,$peticion);
           while($fila=mysqli_fetch_array($resultado)){
              echo $fila["nombre"].'<br />';
              echo $fila["enlace"].'<br />';
              echo'<a href="productos.php?id='.$fila["enlace"].' ">ver mas</a><br /><br />';
           }
?>

But I get an error. However when I change "link" to "id" and compare it to the id of the table there is no problem. What do I do wrong?

What I want to do is that, in my url instead of exiting eg: id = 4, go id = productExample because by "link" in my base I have the name of my product. I hope you understand me Once I did but I do not remember how. I hope you can give me a little hand Thank you

    
asked by jofret 13.10.2017 в 00:42
source

0 answers