All pastes #778248 Raw Edit

Mine

public php v1 · immutable
·published 2007-11-17 13:06 UTC
rendered paste body
class formhelper{ 	var $form;					function __construct($name, $id, $action, $method, $extra)	{		$container = "<form name='".$name."' id='".$id."' action='".$action."' method='".$method."'>\n";		$this->form .= $container;	}	function endform(){		$this->form .= "</form>";				}	function input($name, $id, $type, $value)	{		//if(!$this->formstart) $this->startform		$output = $output . 		"<input type='".$type."' name='".$name."' id='".$id."' value='".$value."'>\n"; 		$this->form .= $output;	}	function form_textarea($name, $id, $style, $class, $cols, $rows, $text, $readonly, $endinghtml)	{		$textarea = "<textarea name=\"$name\" id=\"$id\" style=\"$style\" 		cols=\"$cols\" rows=\"$rows\" $readonly>$text</textarea>$endinghtml";		 		$this->form .= $textarea;	}	function form_select($name, $id, $style, $class, $optionarray, $endinghtml)	{		$select = "<select name=\"$name\" id=\"$id\" style=\"$style\">\n";		reset($optionarray);		while (list($key, $value) = each($optionarray)) 		{ $select = $select . "<option value=\"$key\">$value</option>"; }		$select = $select . "</select>";		 		$this->form .= $select;	}	function make(){		return $this->form;		}}