Percent Complete


Simple tutorial really just adding and dividing :) good for beginners.

First make you index.php file then do what you wish to it.

Next you will want to type up something like:

PHP Code
  1. <?php
  2. $c = "25"; //Coding variable
  3. $f = "25"; //Forums variable
  4. $d = "0"; //Design
  5. $p = "0"; //Panel systems
  6. $domath = ($c+$f+$d+$p)/4; //this does the math of adding and dividing
  7. echo "<b>Coding</b>: $c%
  8. <b>Forums</b>: $f%
  9. <b>Design</b>: $d%
  10. <b>Control Panels</b>: $p%
  11. <b>Total</b>: $domath"; //echos all percents
  12. ?>


That should be it! pretty easy eh?
ShadowMage's Avatar
Author:
Views:
2,459
Rating:
Posted on Sunday 11th May 2008 at 12:30 AM
Adam981
Adam981's Avatar
It's ALIVE! LOL working good :)
Posted on Saturday 10th May 2008 at 10:17 PM
ShadowMage
ShadowMage's Avatar
Updated code try again now, the quotes were messed up.
Posted on Saturday 10th May 2008 at 01:03 PM
Adam981
Adam981's Avatar
Well dude, that kinda sucks. i keep getting this as the display

Coding: $c%
Forums: $f%
Design: $d%
Control Panels: $p%
Total: $domath%
Posted on Tuesday 6th March 2007 at 08:24 PM
ShadowMage
ShadowMage's Avatar
Yep instead of figuring it out on paper you can use a php code.
Posted on Tuesday 6th March 2007 at 02:24 PM
Dean
Dean's Avatar
what esacly does this code to jus count up the total percent complete of your site?