Probably the most efficient way would be using JavaScript to validate the form PRIOR to an actual submit to the php script.
A quick google search found this site http://www.xs4all.nl/~sbpoley/webmatters/formval.html that could guide you.
You could also actually SUBMIT the form to the PHP script and then validate it on the server… If it validates it then process it otherwise present the form back with the values already selected shown, however this would be less efficient, as every time it needs validating, you would take up bandwidth and processor time.
Don’t get me wrong, you still need to validate on the server, but at this point, if it doesn’t validate, you could react differently knowing that the javascript had validated as far as fields filled out completely. The server validation would be a back up and verifying that the data submitted is correct (for latter processing).
Hope that makes sense. I tend to ramble sometimes.