Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <td><?php echo $img1; ?></td>
- <td><?php echo $img2; ?></td>
- <td><?php echo $img3; ?></td>
- <td><?php echo $img4; ?></td>
- <td><?php echo $img5; ?></td>
- <?php
- $value = 10000 //this value is obtained by SQL
- $bar1 = 2600 //is the value of the first bar, obtained by SQL
- $bar2 = 9950 //is the value of the second bar, obtained by SQL
- $bar3 = 13010 //same as before
- $bar4 = 17500 //same as before
- $bar5 = 19500 //same as before
- if($value > 0) && ($value < $bar1) {
- $percent = ($value / $bar1) *100;
- $bar1 = '<img src="progress.png" width="'.$percent.'" />';
- }
- if($value >= $bar1) {
- $percent = '100';
- $bar1 = '<img src="reached.png" width="'.$percent.'" />';
- ?>
- <?php
- if($value > $bar2) && ($value < bar3) {
- $percent = ($value / $bar3) *100;
- $bar3 = '<img src="progress.png" width="'.$percent.'" />';
- }
- >?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement