function printForm() {
print "<form method='post' action='process.php'><br>\n";
print "Name: <input type='text' name='name'><br>\n";
print "Email: <input type='text' name='email'><br><br>\n";
print "<input type='submit' value='Submit'>";
print "</form>";
}
// to call the form
printForm();
You could even weave in and out of PHP in the function.
<? function printForm() { ?>
<form method="post" action="process.php"><br>
Name: <input type="text" name="name"><br>
Email: <input type="text" name="email"><br><br>
<input type="submit" value="Submit">
</form>
<? } ?>
Then just call it later using printForm();
Cgraz