aj123cd Posted September 18, 2012 Share Posted September 18, 2012 HI How to avoid someone filling just space in the input field.? thank u 4u help Quote Link to comment https://forums.phpfreaks.com/topic/268509-how-to-avoid-someone-filling-just-space-in-the-input-field/ Share on other sites More sharing options...
scootstah Posted September 18, 2012 Share Posted September 18, 2012 Use trim and then check if it is empty. $input = trim($_POST['input']); if (empty($input)) { // was only whitespace } Quote Link to comment https://forums.phpfreaks.com/topic/268509-how-to-avoid-someone-filling-just-space-in-the-input-field/#findComment-1378887 Share on other sites More sharing options...
aj123cd Posted September 18, 2012 Author Share Posted September 18, 2012 thank u. Quote Link to comment https://forums.phpfreaks.com/topic/268509-how-to-avoid-someone-filling-just-space-in-the-input-field/#findComment-1378891 Share on other sites More sharing options...
aj123cd Posted September 19, 2012 Author Share Posted September 19, 2012 Thank you for your help Quote Link to comment https://forums.phpfreaks.com/topic/268509-how-to-avoid-someone-filling-just-space-in-the-input-field/#findComment-1379185 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.