如何在循环中实现php中的进度条

时间:2018-04-24 06:57:36

标签: javascript jquery

我将图像质量保存到单个图像到数据库,然后我想一起显示带有进度条值的图像。我编写了脚本,但我获取了第一个图像进度条值。

上半场我从数据库中获取进度条值。

下半年我一起获取图像和进度条值



<?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
  }
}
?>
&#13;
&#13;
&#13;

0 个答案:

没有答案