Generates valid html form with PHP