wads24 Posted May 18, 2013 Share Posted May 18, 2013 So, right now if the form field variable is blank it errors out with below code, but I have been getting a lot of spam submissions on my form and they have been typing in URLs in field. How can I modify the below so that if they put a URL that is will also error out? Thanks in advance for any help! else if(!$_POST['description']) { print "<table style='border-collapse: collapse' id='AutoNumber1' border='0' bordercolor='#111111' cellpadding='0' cellspacing='0' width='100%'> <tr> <td width='38%'> <p align='right'> <img class='decoded' alt='error.png' src='error.png'></td> <td width='26%'> <p align='center'><u><font size='5' color='#FF0000'><b>DESCRIPTION ERROR</b></font></u></td> <td width='36%'> <img class='decoded' alt='error.png' src='error.png'></td> </tr> <tr> <td colspan='3' width='100%'> <p align='center'><font size='1'>The Site Description field cannot be blank, or cannot include and URLs.</font></td> </tr> <tr> <td width='100%' colspan='3'> </td> </tr> <tr> <td width='100%' colspan='3'> <p align='center'><a href='javascript:javascript:history.go(-1)'>Click here to go back to previous page</a></td> </tr> </table>";} Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2013 Share Posted May 19, 2013 have you thought about using Askimet or CAPTCHA? to stop spam.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.