Code: Select all
<html>
<head>
<title>Report Bad Link</title>
</head>
<body>
<form action="badlink.php" method="POST">
Link that is bad:<input type="text" name="link" value="" /><br />
<input type="submit" value="Report!" />
</form>
</body>
</html>
Code: Select all
<?php
$bad_link = $_POST['<span class="posthilit">link</span>'];
if ($bad_link != "") {
$message = "A user has reported this <span class="posthilit">link</span>: " . $bad_link . ", as being bad.";
mail('[email protected]', 'Bad <span class="posthilit">Link</span> <span class="posthilit">Report</span>', $message);
}
header("Location: thankyou.html");
?>
Here is the thank you page to thank the user.
thankyou.html
Code: Select all
<html>
<head>
<title>Thank you</title>
</head>
<body>
Thank you so much for reporting that bad link!
</body>
</html>