I'm working on a form that submits info to a database. I want to check all the submitted form info for the character "<". If that character is present then I do NOT want to script to enter the record.
I've tried a very simple, piece of coding straight from the textbook, but it doesn't work. The programme is continuing to accept new records even if the submissions from the form contain a "<".
Where did I go wrong????
if (strstr($_POST[], "<")) {
print "<b>";
print "<font face='Arial'>";
print "<font color='#990000'>";
print "Could not insert record due to the submission of an illegal character.";
print "<br>";
print "Please re-enter your details and try again.";
print "<br>";
print "</b>";
print "</font>";
echo formdraw();
}