I highlight this howto: Building a PHP5 Form Processor. But the how to also “generate” the form (and the client-side validation code), then the title of this post.

On Dev Shed.