You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
546 B
26 lines
546 B
3 years ago
|
<?php
|
||
|
ini_set('display_errors', 1);
|
||
|
ini_set('display_startup_errors', 1);
|
||
|
error_reporting(E_ALL);
|
||
|
/*
|
||
|
Tested working with PHP5.4 and above (including PHP 7 )
|
||
|
|
||
|
*/
|
||
|
require_once './vendor/autoload.php';
|
||
|
|
||
|
use FormGuide\Handlx\FormHandler;
|
||
|
|
||
|
|
||
|
$pp = new FormHandler();
|
||
|
|
||
|
$validator = $pp->getValidator();
|
||
|
$validator->fields(['name','email'])->areRequired()->maxLength(50);
|
||
|
$validator->field('email')->isEmail();
|
||
|
$validator->field('comments')->maxLength(6000);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
$pp->sendEmailTo('someone@gmail.com'); // ← Your email here
|
||
|
|
||
|
echo $pp->process($_POST);
|