Hello,
I have a html form with a 4 text boxes & a Submit button. I want to prevent the user from keying in the percentage character % into any of the text boxes in the following variations:-
Disallowed Variations:-
%
%%
%%%
%%%%
%%%%% up to 15 characters
mer%edes
%ampro
perdan%
%oyot%
ele%ha%t
I'm using the current code & I trust that you can help me to edit my code. Thank you very much.
for ($i=1; $i<5; $i++) {
if (preg_match('/^([I dont know how to write this part]){1,15}+$/', ($_POST['Text_Box_'.$i]))){
die("This keyword is disallowed. Please change your search criteria to something else. Thanks :-)");
}
}