Ask about general coding issues or problems here.
2 posts • Page 1 of 1
What I do is create a table with 3 fields. id,filename, and hits. When I add a file I put the filename into the db and use this function. It uses the $_GET super global from the ULR and increments the hits field and redirects to download the file.
Code: Select all
if(!empty($_GET['file']) && $_GET['file'])
$query = 'update filedls set hits = hits +1 where filename = "'.$file.'"';
Who is online
Users browsing this forum: No registered users and 11 guests