Assuming you're using PHP and MySQL, simply create a new field in your database called, for example, 'bad', then use a simple script such as this to flag bad links as such:
PHP Code:
if($id = (int) $_GET['id']) {
mysql_query('UPDATE `tablename` SET `bad` = 1 WHERE `id` = $id');
echo 'Bad link reported.';
}
else {
echo 'Error: you must specify a link to report as bad.';
}
Invoke using a link like this:
HTML Code:
<a href="reportbad.php?id=123">Report bad link</a>
You may also wish to store information such as IP address / username, to minimise abuse.
Similar techniques could be used in other languages such as ASP.
|