delickate Posted December 17, 2008 Share Posted December 17, 2008 hello, i've a an array of text boxes.i'ld like to access only those textbox data that is filled by user. any body know how to get? Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted December 17, 2008 Share Posted December 17, 2008 for instance if you have multiple textboxes on one form with their name defined as "testbox[]" you could do... <?php foreach($_POST['testbox'] as &$testbox) { if(!empty($testbox)) { // do something } } ?> Quote Link to comment Share on other sites More sharing options...
dokueki@gmail.com Posted December 17, 2008 Share Posted December 17, 2008 Use if (strlen($array[value]) > 0) To determine if the field isn't empty. (Of course, replace $array with the array, and value with the value.) 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.