Mega Code Archive
Using a hidden parameter to indicate form submission
if ($_POST['_submit_check']) {
process_form();
} else {
show_form();
}
function process_form() {
print "Hello, ". $_POST['my_name'];
}
function show_form() {
print<<<_HTML_
_HTML_;
}
?>