rating bar

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 9
Joined: Thu Apr 10, 2003 10:33 am
Location: brooklyn, ny

Thu Apr 10, 2003 10:45 am


I have a database application in PHP and one of the fields is rating. What I want is a bar that is sometimes is used in polls that displays percentage-wise the value of rating. So, if I have rating value 100 (100%) then my bar would be full, 50 (50%) bar is half full.


New php-forum User
New php-forum User
Posts: 6
Joined: Fri May 09, 2003 7:31 am

Fri May 09, 2003 7:51 am

you can make it with imagecreate() function to draw an image. or with tables (width and height)
let's kick mud!

User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Sat May 10, 2003 7:42 am

simple just from the talbe get the percentage info

Code: Select all

<img src=".." width=<?php echo(The percent value) ?> height="..">

Thats it

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest