OK, (Kerm should know a lil about this) On my download counter, I have it display each file's download stats. My question is is there an easy way to have it add them all together and display that total on the bottom?

The variable is ccount_display('X') X being the section in the list.
$totaldls = array_sum($ccount_display);
woudn't it be $totaldls = array_sum($ccount_display('X'); (just a guess)

i don't know about the arraysum funtion, but how would it know to add the X col without it? (not trying to be offenceive, really just wondering)
I am as well. Is php easier to learn than perl?

Also, where would I include that at? Inside the actual program, or within the javascript tags?
In the .php program, put this right before any ''print...'' lines

$totaldls = array_sum($ccount_display);
$lastelement = count($ccount_display);
$ccount_display[$lastelement] = $totaldls;
Ok, I will try that.
Great. If it doesn't work, feel free to post the source code for the display PHP script here so I can debug it.
That is the thing, there is no 'display' script for the numbers I am using. Those are being recalled from the array or list, which ever it is called. It is just using a javascript tag for that.

I'll try it and see what happens...
If you go to the control panel, file manager, php script directory, php, edit file, post that code.
I will add it later...
Any luck?
I am trying it now. (Crosses fingers and hopes nothing breaks...)

Ok, it isn't displaying anything. What variable do I need to put in the script tags??
Check out the code I posted in Site Updates.
what does the '.=' mean??
probably typo

[Please note that this post has been rebuilt from a corrupted database.]
again book cgi i learn library mentioned read reading shall think

[Please note that this post has been rebuilt from a corrupted database.]
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement