rating bar

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

rating bar

Postby webtekie » Thu Apr 10, 2003 10:45 am

Hi,

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.

Thanks,
webtekie

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

Postby mudkicker » Fri May 09, 2003 7:51 am

you can make it with imagecreate() function to draw an image. or with tables (width and height)

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

img tag

Postby ruturajv » Sat May 10, 2003 7:42 am

simple just from the talbe get the percentage info
and
then

Code: Select all

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

Thats it


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests