I have a very simple "report link" feature on my site so visitors can let me know if the links are dead. The script below has worked fine until recently. Now when someone reports a link it gets reported 2-3 times. Is it my server or do I need to add something to the code? Thanks! <?php $link = $_GET['link']; $ip = $_GET['ip']; $email = "myemail@email.com"; $subject = "Reported Link"; $body = "The page $link has been reported. IP $ip"; mail($email, $subject, $body); ?> PHP:
Maybe you should use post variables instead of get variables. It kind of sounds like people are refreshing the page...
You may need to return to the previous page with the header() function to prevent the refreshing.. The code is too simple and unsafe, make sure to write a better one.