I want to display images in php from my database using Mysqli. THis is my code in question.php:
<form class="form-horizontal" role="form" id='login' method="post" action="result.php">
<?php
$row = mysqli_query( $conn, "select id,question_name,image from questions where category_id=1 and level_id=1 ORDER BY RAND() LIMIT 10");
$i = 0;
$j = 1; $k = 1;
?>
<?php while ( $result = mysqli_fetch_assoc($row) ) {
//if ( $i == 0) echo "<div class='cont' id='question_splitter_$j'>";?>
<div id='question<?php echo $k;?>' >
<p class='questions' id="qname<?php echo $j;?>"> <?php echo $k?>.<?php echo $result['question_name'];?></p>
<?php echo "<img src='".$result['image']."'/>";?>
<input type="text" name="reponse" required />
<br/>
</div>
<?php
$k++;
} ?>
</form>
My table is :
But the result is like here:
can you please help me to display my images correctly?