dsp77 Posted April 11, 2011 Share Posted April 11, 2011 Hello, i need to validate 200 input fields if they are not empty, i have the following code where i'm stuck and i'm missing something any help is appreciated if($_SERVER['REQUEST_METHOD'] == 'POST') { //print_r($_POST); foreach ($_POST as $value) { if (empty($value)){ echo 'empty'; } else { echo 'notempty'; } } } Quote Link to comment https://forums.phpfreaks.com/topic/233348-validate-200-input-fields/ Share on other sites More sharing options...
Adam Posted April 11, 2011 Share Posted April 11, 2011 What's the problem with it? Quote Link to comment https://forums.phpfreaks.com/topic/233348-validate-200-input-fields/#findComment-1200000 Share on other sites More sharing options...
dsp77 Posted April 11, 2011 Author Share Posted April 11, 2011 the problem is fixed by adding break ,i was dazed by the 200 echos . Quote Link to comment https://forums.phpfreaks.com/topic/233348-validate-200-input-fields/#findComment-1200001 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.