I'm able to see the table result but in the image column doesn't shows image, but if I load ajax_search_r.php
or ajax_search_r.php
directly, I'm able to see the image. What is happening when trying to render DATA returning, is the same echo code which I'm trying to load, cloud someone help me please ?
I have jQuery click event that inside call.
This is the Main.PHP
page and inside call this
<body>
<div id="search"></div>
...
$.post("../ajax/ajax_search_r.php",{criteria:criteria,value:value},function(data){
$('#search').html(data);
...
this is my ajax_search_r.php
...
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['0'] . "</td>";
echo "<td>" . $row['1'] . "</td>";
echo "<td>" . $row['2'] . "</td>";
echo "<td>" . $row['3'] . "</td>";
echo "<td>" . $row['4'] . "</td>";
echo "<td>" . $row['5'] . "</td>";
echo "<td>" . $row['6'] . "</td>";
echo "<td><img src=ajax_image.php?id=".$row['0']." width=160 height=120/></td>";
echo "</tr>";
}
echo "</table>";
...
and the ajax_image.php
...
if($result)
{
$picture = mysqli_fetch_array($result);
header('Content-Type: image/jpg');
echo $picture['11'];
}else
echo "problem";
...