anaesthesiac Posted March 28, 2009 Share Posted March 28, 2009 i'm very new to php, i only did my first tutorial for a very basic page hit counter a few days ago. I have a question, and i hope i'm asking in the right place, i apologise if i'm not. I have a music website i'm trying to build and would just like a very easy way of displaying the number of times each of my files has been downloaded or the link clicked. I have already created the page, and have spent the last two days solid trying to use X amount of scripts but to no avail. I don't want to have to change the page itself, just insert the numerical data in a table that already exists. If anyone cares to see what i have, the page is: www.anaesthesiac.com/music.html . I already have a basic stat counter up there, but have no idea how to use this data in the Music page. The stat details are: www.anaesthesiac.com/stats.php . This may be an annoying issue you've already dealt with, i tried looking at the forum threads but couldn't find anything concerning this issue. If anyone cares to give me advice on what to do or what to read i'd be most appreciative. Cheers. Link to comment https://forums.phpfreaks.com/topic/151494-download-statclick-count-issue/ Share on other sites More sharing options...
ratcateme Posted March 28, 2009 Share Posted March 28, 2009 your not going to like this advise but if you are planning a music sharing site you need to learn how to use a database. it is a billion times better. it is far easier to add new songs and you can have it generate a things like a most popular list, latest added or a rating system. but i am guessing that would require a total redesign also i would advise steering away from pre-coded scripts they can get very complicated to maintain and update when you want to change something and you have no idea how it works. there a heaps of tutorials for php/mysql check out http://www.tizag.com/ for a good start. and we are always here to help if you get lost Scott. Link to comment https://forums.phpfreaks.com/topic/151494-download-statclick-count-issue/#findComment-795676 Share on other sites More sharing options...
anaesthesiac Posted March 28, 2009 Author Share Posted March 28, 2009 Thanks for the link, i'll be looking at it in a moment, i appreciate your reply. I've been told by the person who hosts my websites that i need to get into databases, i'm looking at php & mysql books online at the moment. the site i'm doing though isn't a music sharing site so much as it is a little catalogue of my music as a musician. It will remain fairly static apart from a new track every month or two, so it's expansion won't be huge. I understand what you mean by pre-coded scripts, i have found them hugely annoying and inconvenient [then again i don't understand much about them] but basically i just wanted something simple and easy while i try and get my head around the fundamentals of PHP [it's quite daunting]. my experience is limited to the design side of things and the basics of PHP are making me dizzy Cheers Link to comment https://forums.phpfreaks.com/topic/151494-download-statclick-count-issue/#findComment-795681 Share on other sites More sharing options...
ratcateme Posted March 28, 2009 Share Posted March 28, 2009 you can make a simple database with one table with say 8 fields (id,album,name,file,genre,date,size,hits) you could add the songs manually although a script would most likely take less time in the long run. although just thinking about scripts and stuff 2 tables might be better one for the tracks and one for the albums. Scott. Link to comment https://forums.phpfreaks.com/topic/151494-download-statclick-count-issue/#findComment-795685 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.