'%' Getting through Preg_Match and causing DB error
Posted by:
Ryan Walsh
Date: February 01, 2014 06:01PM
Hello,
I have a series of text inputs with the preg match to check for special characters. This is a sample of one of the inputs preg_match:
if (preg_match('/^[[:alnum:]\.\-]{6,30}$/', trim($_POST ['security_answer']))) {
It seems to be working fine unless a user enteres a % symbol. What can I do to have this kick back an error like the rest of the invalid preg_matches?
Instead it goes to a "Not Acceptable" 404 error page.
Thanks,
Ryan
Subject
Written By
Posted
'%' Getting through Preg_Match and causing DB error
February 01, 2014 06:01PM
February 03, 2014 02:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.