Forum Moderators: coopster
I have an email form on a few websites i run.
However..we've had a few (well..handful) that is obviously a 'scam' or 'spam' trying to get us to advertise or join this website or whatever. And it usually goes on for several million pages.
Is there anyway, using php, to detect the number of characters in a form field, and if it goes over the limit, it returns you back to the form with an error message above that form field.
I know theres ways using javascript..but like we all know, turn off javascript and you can write however much you like. So i'd like to try and avoid that way if possible.
thanks
:)
Example:
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>
As it might be tricky (for me anyway) putting this into that form, I'll look into creating a seperate email processing file from scratch so i can teach myself the in's and out's of form processing and all the extra bits.
:)
I'll get back to you when i get stuck..so probably about 10 minutes ;) :p