I save the image quality to the individual image to the database, then i want to show the image with progress bar value together. I wrote the script but i takes the first image progress bar value.
First half I take the progress bar value from database..
Second half I fetch image together with progress bar value
<?php
$targetid = $_REQUEST['id'];
$conn = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$conn->autocommit(FALSE);
$query = " SELECT * FROM others " ;
$result1 = $conn->query($query);
if($result1->num_rows >0) {
while($rowquerycat = $result1->fetch_assoc()) {
$imgqulty = $rowquerycat['imagefeature'];
//echo $imgqulty;
?>
<!---progress-->
<script>
$( function() {
$( "#progressbar" ).progressbar({
value: '<?php echo $imgqulty; ?>'
});
});
</script>
<!---end--->
<?php
}
}
$query = " SELECT * FROM " . TB_OTHERS ;
$result1 = $conn->query($query);
if($result1->num_rows >0) {
while($rowquerycat = $result1->fetch_assoc()) {
?>
<div id="progressbar" style="height: 0.5em;width: 50%;margin-left: 30%;" >sample</div>
<?php
}
}
?>