bluewaves Posted August 4, 2009 Share Posted August 4, 2009 I am using a search feature that needs some restrictions put on it. When the search is blank and the button submitted it returns everything in the database. How can I fix that? Link to comment https://forums.phpfreaks.com/topic/168732-search-feature/ Share on other sites More sharing options...
ToonMariner Posted August 4, 2009 Share Posted August 4, 2009 validate your input - only permit searches with say 3 or more characters... Link to comment https://forums.phpfreaks.com/topic/168732-search-feature/#findComment-890200 Share on other sites More sharing options...
phpSensei Posted August 4, 2009 Share Posted August 4, 2009 trim the inputted value, check the length of the string, then check if its empty... If it passes all of those 3, show the search.. Link to comment https://forums.phpfreaks.com/topic/168732-search-feature/#findComment-890205 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.