This is a blog for me to keep my scripting notes in, if you like the code go ahead and copy it.
Tuesday, September 11, 2012
HTML Form Class Object
I got your form right here.
$form = new form("myform");
echo $form->HTML();
This will print
----------------------
<form id="myform" name="myform" action="index.php" method="post">
</form>
---------------------
<?php
/**
* Description of form
* HTML form Object
* @author Joseph Tveter
*/
class form extends HTML
{
public function __construct($name = "form", $action = "index.php", $method = "post")
{
parent::__construct("form");
parent::addValue("id", $name);
parent::addValue("name", $name);
parent::addValue("action", $action);
parent::addValue("method", $method);
}
}
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment