|
#1
|
|||
|
|||
Donation progress bar
hello to all who read this.
i need a little help with this mod, it's seem working on the page but when i update account to test seem the bar not moving at all.. how to make it working..? what sql i have to add in my database? i'm a noob in sql and all these coding thing.. hope get a guide from a pro in here.. the image : the code: Code:
//====donation progress bar by snuggles enjoy $total_funds = sql_query("SELECT sum(cash) as USD FROM funds"); $arr_funds = mysql_fetch_array($total_funds); $funds_so_far = $arr_funds["total_funds"]; $totalneeded = "264"; //=== set this to your monthly wanted amount $funds_difference = $totalneeded - $funds_so_far; $Progress_so_far = number_format($funds_so_far / $totalneeded * 100, 1); if($Progress_so_far >= 100) $Progress_so_far = "100"; echo"<table width=140 height=20 border=2><tr><td bgcolor=white align=center valign=middle width=$Progress_so_far%>$Progress_so_far%</td><td bgcolor=grey align=center valign=middle</td></tr></table>"; //end } |
#2
|
|||
|
|||
Check you have any values in your SQL table for $total_funds
|
#3
|
|||
|
|||
i don't know how to add the SQL..
can anyone make one? |
#4
|
||||
|
||||
Code:
CREATE TABLE `funds` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `cash` DECIMAL(8,2) NOT NULL DEFAULT '0.00', `user` INT(10) UNSIGNED NOT NULL DEFAULT '0', `added` INT(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Quote:
|
The Following User Says Thank You to KrackerMan For This Useful Post: | ||
hatijahat (2nd January 2014)
|
Tags |
bar , donation , progress |
|
|