<?php class Form { private $method; private $type; private $field_type; private $field_name; private $field_value; private $field_class; public function form_open($method,$type) { $this->method = $method; $this->type = $type; return "<fomr method='{$this->method}' '{$this->type}'>"; } public function field_create($field_type,$field_name,$field_value,$field_class) { $this->field_type = $field_type; $this->field_name = $field_name; $this->field_value = $field_value; $this->field_class = $field_class; return "<input type='{$this->field_type}' name='{$this->field_name}' value='{$this->field_value}' class='{$this->field_class}'>"; } public function form_close() { return "</form>"; } } ?>