0
I am starting in PHP programming and downloaded a source code to be learning, and this code presents a datatables, in which I want to insert an image in the grid that is in the mysql database. My code below for anyone who can guide me, I am grateful to all
$dados = array();
while( $row =mysqli_fetch_array($resultados) )
{
$dado = array();
$Foto = $row["Imagem"];
$dado[] = "<img src='Fotos/'
$Foto class='img-responsive img-circle' width=20 height=20/>";
$dado[] = $row["Id"];
$dado[] = utf8_encode($row["Descricao"]);
$dados[] = $dado;
};
Not showing the image on the datatables grid.
An Obs.: you are putting the variable
$Foto
(assuming it is the name of the image) outside thesrc
.– Sam
What is the image format? CLOB?
– adventistaam
I am using in the table the field Image varchar(15), and the images have extensions . jpg
– Fernando
I am saving in the table photo variable only the name of the image. ex: prod1.jpg
– user157843