Hello please i have a download webpage which allow users to download mp3 files. I want to display the number  of times a user has click the download button and display it on the webpage. The records are in a database  and this is my code.

This is my download button which will be click to update my record count...

<a href="file.php?id=<?php echo $row['song_id']; ?>" class="btn btn-primary"><i class="fa fa-download"></i></a>

My database looks like this...
song_id       song       artist     filename   download
xxx          xxx          xxxx       xxxx              xxxx
  I want the count to update the download column anyt time a button is clicked.
  Any help please.

Try keeping your post together in one place. This sounds like https://www.daniweb.com/programming/web-development/threads/519187/how-to-count-file-download-with-button-click-using-php-mysql to me.

So yes, you would code it so when the download button is clicked you +1 your song's download count in your database.

In case no one writes your code for you (rare here), there's a google about this: https://www.google.com/search?q=Increment+sql+entry+on+button+click&gl=US

commented: Sorry wasn't clear with the other post +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.