progetto di prova che mostra le macchine fiat e un form che permette di contattare
filippo.bertilotti
2024-04-24 c34154c6ba1f55e401c13ee89560aec31d7fa1c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
    require '../vendor/autoload.php';
    use Smarty\Smarty;
    $smarty = new Smarty();
 
    $smarty->setTemplateDir('../ihtml');
    $smarty->setCompileDir('../compile');
 
 
    if(!empty($_GET['number']) && !empty($_GET['email'])) {
        if(is_numeric($_GET['number']) && strlen($_GET['number']) == 10) {
            $number = $_GET['number'];
            $email = $_GET['email'];
        }else {
            $number = 'Numero di telefono non corretto';
            $email = '';
        }
    }else {
        $number = '';
        $email = '';
    }
 
    $smarty->assign('cellNumber', $number);
    $smarty->assign('email', $email);
    $smarty->display('contact.tpl');
?>