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'; } } } 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? 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 . Link to comment https://forums.phpfreaks.com/topic/233348-validate-200-input-fields/#findComment-1200001 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.