as can see, have simple registration form, , php script validate fields. idea here is, if have 20+ fields, , required at-least user fill .. username, lastname , age , store in array have done below. $needed = array("username", "lastname", "age"); so, can see in code, for loop check if 1 of them filled, code works part. ex: if don't fill 3 fields you must fill username continue you must fill lastname continue you must fill age continue but, if fill on field , left other two, or fill 2 , leave one, echo '<p>required fileds filled</p>'; so, problem here that, fields should filled before script can go saying echo '<p>required fileds filled</p>'; <pre> <form action='' method='post'> <input type='text' name='username' /> <input type='text' name='lastname' /> <input type='text' name='age...