Redirect to success page example.
Redirect to success page exampleOnce the form is validated, it can also be redirected to another URL. This can be done by setting the 'successURL' parameter in the form.
<?php
require_once '../../HtmlForm.php';
echo('<a href="">redirect.php</a>');
echo('<pre>');
var_dump($form->getValues());
echo('</pre>');
$form->clearSession();
<?php
require_once '../../HtmlForm.php';
$form->addText('username', ['label' => 'User name']);
$form->addEmail('email', ['label' => 'Email address']);
$form->process();
?>
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="../../lib/css/depage-forms.css">
</head>
<body>
<?php echo($form); ?>
</body>