Ok, i'ev got this code, and what happens is when you click the download link it wuold go to count.php?id=2 for example.
Would that add a "number times downloaded" to the SQL database and then forward them to the download?PHP Code:<?php
include ('config.php');
$id = $_GET['id'];
if (!is_numeric($id))
{
exit;
}
mysql_query ("UPDATE downloads SET total = total + 1 WHERE id = '$id'");
$result = mysql_query("SELECT * FROM downloads WHERE id = '$id'");
$row = mysql_fetch_object ($result);
header("Location: " . $row->url);
?>
Thanks
Luke
Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks.





.
Reply With Quote


lol.
