Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

rating bar

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

rating bar

Postby webtekie » 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: 9
Joined: Thu Apr 10, 2003 10:33 am
Location: brooklyn, ny

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)
New php-forum User
New php-forum User
Posts: 7
Joined: Fri May 09, 2003 7:31 am

img tag

Postby ruturajv » 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
User avatar
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.