commit | author | age
|
395ba3
|
1 |
<?php |
F |
2 |
require '../vendor/autoload.php'; |
|
3 |
use Smarty\Smarty; |
|
4 |
$smarty = new Smarty(); |
|
5 |
|
|
6 |
$smarty->setTemplateDir('../ihtml'); |
|
7 |
$smarty->setCompileDir('../compile'); |
25190e
|
8 |
|
0398ab
|
9 |
$error = []; |
F |
10 |
$number = $_GET['number'] ?? ''; |
|
11 |
$email = $_GET['email'] ?? ''; |
25190e
|
12 |
|
0398ab
|
13 |
if(!is_numeric($number) && strlen($number) != 10) { |
F |
14 |
$error['number'] = 'Numero di telefono non corretto'; |
25190e
|
15 |
} |
0398ab
|
16 |
|
F |
17 |
if(true) { |
|
18 |
$error['email'] = 'email non valida'; |
|
19 |
} |
bed030
|
20 |
|
c34154
|
21 |
$smarty->assign('cellNumber', $number); |
F |
22 |
$smarty->assign('email', $email); |
0398ab
|
23 |
|
F |
24 |
$smarty->assign('error', $error); |
|
25 |
|
395ba3
|
26 |
$smarty->display('contact.tpl'); |
F |
27 |
?> |