Location: PHPKode > scripts > HTML form generator and submit > example.php
<?php
	require_once("form.class.php");
	
	$form=new Form;
	$form->set_storage_file("storage.txt");
	$form->set_action("");
	$form->set_method("POST");
	$form->set_id("my_form");
	$form->set_class("css_style");
	$form->setOptions("hidden:url:".$_SERVER['REQUEST_URI'].";*textfield:name;*textfield:email:your+email;textfield:website;*textarea:comment;textfield:referal:please");
	$form->retrieve_html();
	if (isset($_POST['submit_form']))
		$form->code_processor();
		
	/*show comments*/
	
	$file = file_get_contents("storage.txt");
	$exp = explode("\n", $file);
	for ($i = 0; $i < count($exp); $i++) {
		$exp2 = explode(";", $exp[count($exp)-1 - $i]);
		for ($x = 0; $x < count($exp2); $x++) {
			//print $exp2[$x]."\n";
			$exp3 = explode(":", $exp2[$x]);
			if ($exp3[0] == "url")
				if ($exp3[1] != $_SERVER['REQUEST_URI'])
					break;
			echo "<strong>".$exp3[0]."</strong><br />\n";
			echo str_replace("+", " ", $exp3[1])."<br />\n";
		}
	}
?>
Return current item: HTML form generator and submit