ID='secure_form'; $form->METHOD='POST'; $form->ACTION='?'; $form->debug='trigger_error'; $error=$form->AddInput(array( 'TYPE'=>'custom', 'VALUE'=>'Secure submit', 'ID'=>'secure_submit', 'NAME'=>'secure_submit', 'CustomClass'=>'form_secure_submit_class', 'Key'=>$key, /* 'ExpiryTime'=>300, "SRC"=>"http://www.phpclasses.org/graphics/add.gif", */ )); if(strlen($error)) die("Error: ".$error); $submitted=$form->WasSubmitted('secure_submit'); $form->LoadInputValues($submitted); $verify=array(); if($submitted) { if(strlen($error_message=$form->Validate($verify))==0) $doit=1; else { $doit=0; $error_message=HtmlEntities($error_message); } } else { $error_message=''; $doit=0; } if(!$doit) { $focus='secure_submit'; $form->ConnectFormToInput($focus, 'ONLOAD', 'Focus', array()); } $onload=HtmlSpecialChars($form->PageLoad()); ?> Test for Manuel Lemos' PHP form class secure submit button

Test for Manuel Lemos' PHP form class secure submit button


The form was submitted securely!

StartLayoutCapture(); if(strlen($error=$form->GetInputProperty('secure_submit', 'Expired', $expired))==0 && $expired) { ?>

The form submission expired. Please submit the form again.

AddInputPart('secure_submit'); ?>
EndLayoutCapture(); $form->DisplayOutput(); } ?>