<?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->fields(['gender','gender'])->areRequired()->maxLength(50);
$validator->field('email')->isEmail();
$validator->fields(['phone','phone'])->areRequired()->maxLength(50);
$validator->fields(['country','country'])->areRequired()->maxLength(50);
$validator->fields(['homeaddress','homeaddress'])->areRequired()->maxLength(300);
$validator->fields(['message','message'])->areRequired()->maxLength(500);



$pp->attachFiles(['image']);


$pp->sendEmailTo('irrcl@i-r-recovery-c-l.com'); // ← Your email here

echo $pp->process($_POST);