TheSky Posted April 18, 2011 Share Posted April 18, 2011 I need make error lower then 3 and higher then 15 how should i add higher then 15? if (strlen($searchTerms) < 3) { $error[] = "Add more then 3 symbols and less then 15!"; }else { $searchTermDB = mysql_real_escape_string($searchTerms); // prevent sql injection. } Quote Link to comment Share on other sites More sharing options...
spiderwell Posted April 18, 2011 Share Posted April 18, 2011 you just need to add the extra bit for the 15, || is OR so its less than 3 or more than 15 (strlen($searchTerms) < 3 || strlen($searchTerms) > 15 ) Quote Link to comment Share on other sites More sharing options...
TheSky Posted April 18, 2011 Author Share Posted April 18, 2011 thanks. 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.